1var wds; 2var wds_carousel = []; 3var wds_currentlyMoving = []; 4var wds_currentCenterNum = []; 5var textLayerPosition = []; 6var wds_zoomfade_first_img = 0; 7 8jQuery(window).resize(function () { 9 wds_resize(); 10}); 11 12jQuery(document).ready(function () { 13 jQuery(".wds_slider_cont").each(function () { 14 wds = jQuery(this).attr("data-wds"); 15 if ( wds_params[wds].carousel == 1 ) { 16 wds_currentlyMoving[wds] = false; 17 wds_currentCenterNum[wds] = wds_params[wds].start_slide_num_car; 18 wds_params[wds].wds_currentCenterNum = wds_currentCenterNum[wds]; 19 jQuery(".wds_left-ico_" + wds).click(function () { 20 wds_carousel[jQuery(this).closest('div[class^="wds_slider_cont"]').attr("data-wds")].prev(); 21 }); 22 jQuery(".wds_right-ico_" + wds).click(function () { 23 wds_carousel[jQuery(this).closest('div[class^="wds_slider_cont"]').attr("data-wds")].next(); 24 }); 25 } 26 /* Start first image with zoomFade */ 27 if ( wds_params[wds].slider_effect === "zoomFade" ) { 28 start_slide_num = wds_params[wds].start_slide_num; 29 wds_change_image(wds, start_slide_num, start_slide_num, wds_params[wds].wds_data); 30 } 31 }); 32 wds_slider_ready(); 33}); 34 35jQuery(window).on('load', function () { 36 jQuery(".wds_slider_cont").each(function () { 37 wds = jQuery(this).attr("data-wds"); 38 if (!wds_object.is_free && wds_params[wds].carousel == 1) { 39 wds_carousel_params(wds); 40 wds_display_hotspot(); 41 wds_hotspot_position(); 42 } 43 }) 44}); 45 46function wds_resize() { 47 jQuery(".wds_slider_cont").each(function () { 48 wds = jQuery(this).attr("data-wds"); 49 wds_resize_slider(wds); 50 jQuery.each( wds_params[wds].callback_items, function( index, value ) { 51 if ( index === 'onSliderR' && value !== '' ) { 52 var wds_callback_f = new Function( wds_params[wds].callback_items.onSliderR ); 53 wds_callback_f(); 54 } 55 }); 56 }); 57 if ( !wds_object.is_free ) { 58 jQuery(".wds_slider_cont").each(function () { 59 wds = jQuery(this).attr("data-wds"); 60 if (wds_params[wds].carousel == 1) { 61 wds_carousel_params(wds); 62 wds_carousel[wds].pause(); 63 if (!jQuery(".wds_ctrl_btn_" + wds).hasClass("fa-play")) { 64 wds_carousel[wds].start(); 65 } 66 } 67 }); 68 } 69} 70 71/* ready slider. */ 72function wds_slider_ready() { 73 jQuery(".wds_slider_cont").each(function () { 74 var wds = jQuery(this).attr("data-wds"); 75 if (wds_params[wds].current_image_url != '') { 76 jQuery('<img />').attr("src", wds_params[wds].current_image_url).on('load', function () { 77 jQuery(this).remove(); 78 wds_ready_func(wds); 79 }); 80 wds_data[wds_params[wds].wds_current_key]["loaded"] = true; 81 } 82 else { 83 wds_ready_func(wds); 84 } 85 if (wds_params[wds].fixed_bg == 1) { 86 jQuery(window).scroll(function () { 87 wds_window_fixed_pos(wds); 88 }); 89 } 90 wds_params[wds].wds_play_pause_state = 0; 91 if (wds_params[wds].carousel == 1) { 92 wds_carousel_params(wds); 93 } 94 document.addEventListener("visibilitychange", function() { 95 if(document.visibilityState != 'visible') { 96 window.clearInterval(wds_params[wds].wds_playInterval); 97 wds_event_stack_wds = []; 98 if (typeof jQuery().stop !== 'undefined') { 99 if (jQuery.isFunction(jQuery().stop)) { 100 if (wds_params[wds].timer_bar_type == 'top' || wds_params[wds].timer_bar_type == 'bottom') { 101 jQuery(".wds_line_timer_" + wds).stop(); 102 if (wds_params[wds].carousel) { 103 wds_carousel[wds].pause(); 104 } 105 } 106 else if (wds_params[wds].timer_bar_type != 'none') { 107 wds_params[wds].circle_timer_animate.stop(); 108 if (wds_params[wds].carousel) { 109 wds_carousel[wds].pause(); 110 } 111 } 112 } 113 } 114 } else { 115 wds_restart_slideshow_autoplay( wds ); 116 } 117 }); 118 }); 119} 120 121/* restart slideshow. */ 122function wds_restart_slideshow_autoplay( wds ) { 123 if (!jQuery(".wds_ctrl_btn_" + wds).hasClass("fa-play")) { 124 if (wds_params[wds].enable_slideshow_autoplay) { 125 play_wds(wds); 126 if (wds_params[wds].carousel == 1) { 127 wds_carousel[wds].start(); 128 } 129 if (wds_params[wds].timer_bar_type != 'none') { 130 if (wds_params[wds].timer_bar_type != 'top') { 131 if (wds_params[wds].timer_bar_type != 'bottom') { 132 if (typeof wds_params[wds].circle_timer_animate !== 'undefined') { 133 wds_params[wds].circle_timer_animate.stop(); 134 } 135 wds_circle_timer(wds, wds_params[wds].curent_time_deggree); 136 } 137 } 138 } 139 } 140 } 141 if (wds_params[wds].carousel != 1) { 142 var i_wds = 0; 143 jQuery(".wds_slider_" + wds).children("span").each(function () { 144 if (jQuery(this).css('opacity') == 1) { 145 jQuery("#wds_current_image_key_" + wds).val(i_wds); 146 } 147 i_wds++; 148 }); 149 } 150} 151 152function wds_carousel_params(wds) { 153 var width, height; 154 var slide_orig_width = wds_params[wds].image_width; 155 var slide_orig_height = wds_params[wds].image_height; 156 var slide_width = wds_get_overall_parent(jQuery("#wds_container1_" + wds)); 157 var par = 1, par1 = 1; 158 var ratio = slide_width / slide_orig_width; 159 if (jQuery(window).width() <= parseInt(wds_params[wds].full_width_for_mobile) || (wds_params[wds].full_width == '1')) { 160 var full_width = '1'; 161 } 162 else { 163 var full_width = '0'; 164 } 165 if (full_width == '1') { 166 ratio = jQuery(window).width() / slide_orig_width; 167 slide_orig_width = jQuery(window).width() - (2 * wds_params[wds].wds_glb_margin); 168 slide_orig_height = wds_params[wds].image_height * slide_orig_width / wds_params[wds].image_width; 169 slide_width = jQuery(window).width() - (2 * wds_params[wds].wds_glb_margin); 170 wds_full_width(wds); 171 } 172 else if (parseInt(wds_params[wds].full_width_for_mobile)) { 173 jQuery(".wds_slideshow_image_wrap_" + wds).removeAttr("style"); 174 } 175 var slide_height = slide_orig_height; 176 if (slide_orig_width > slide_width) { 177 slide_height = Math.floor(slide_width * slide_orig_height / slide_orig_width); 178 } 179 width = slide_width; 180 height = slide_height; 181 var larg_width, img_height, parF = 1; 182 if (width < wds_params[wds].carousel_width) { 183 par = width / wds_params[wds].carousel_width; 184 } 185 par1 = wds_params[wds].image_height * par / height; 186 if (width < wds_params[wds].carousel_width) { 187 jQuery(".wds_slideshow_image_wrap_" + wds + ", #wds_container2_" + wds).height(height * par1 + ((wds_params[wds].filmstrip_direction == 'horizontal') ? wds_params[wds].filmstrip_he
187ight : 0)); 188 jQuery(".wds_slideshow_image_container_" + wds).height(height * par1); 189 jQuery(".wds_btn_cont wds_contTableCell" + wds).height(height * par1); 190 jQuery(".wds_slide_container_" + wds).height(height * par1); 191 } 192 if (full_width == '1') { 193 var parF = parseFloat(wds_params[wds].carousel_image_parameters); 194 parF = isNaN(parF) ? 1 : parF; 195 parF *= wds_params[wds].image_width; 196 jQuery(".wds_slideshow_image_wrap_" + wds + ", #wds_container2_" + wds).height(height * par1 + ((wds_params[wds].filmstrip_direction == 'horizontal') ? wds_params[wds].filmstrip_height : 0)); 197 jQuery(".wds_slideshow_image_container_" + wds).height(height * par1); 198 jQuery(".wds_btn_cont wds_contTableCell" + wds).height(height * par1); 199 jQuery(".wds_slide_container_" + wds).height(height * par1); 200 } 201 if (wds_params[wds].carousel_image_counts > wds_params[wds].slides_count) { 202 wds_params[wds].carousel_image_counts = wds_params[wds].slides_count; 203 } 204 if (wds_params[wds].carousel_image_parameters > 1) { 205 wds_params[wds].carousel_image_parameters = 1; 206 } 207 var interval = 0; 208 if (wds_params[wds].enable_slideshow_autoplay) { 209 interval = wds_params[wds].slideshow_interval; 210 } 211 var slideshow_filmstrip_container_width = wds_params[wds].filmstrip_direction == 'horizontal' ? 0 : jQuery(".wds_slideshow_filmstrip_container_" + wds).width(); 212 jQuery(".wds_slideshow_dots_container_" + wds).css({ 213 width: (wds_params[wds].image_width * par), 214 left: (width - wds_params[wds].image_width * par - slideshow_filmstrip_container_width) / 2 215 }); 216 var orig_width = wds_params[wds].image_width; 217 var img_width = Math.min(larg_width, orig_width); 218 wds_carousel[wds] = jQuery(".wds_slide_container_" + wds).featureCarouselslider({ 219 containerWidth: width, 220 containerHeight: height, 221 largeFeatureWidth: wds_params[wds].image_width * par, 222 largeFeatureHeight: wds_params[wds].image_height * par, 223 fit_containerWidth: wds_params[wds].carousel_fit_containerWidth, 224 smallFeaturePar: wds_params[wds].carousel_image_parameters, 225 featuresArray: [], 226 timeoutVar: null, 227 rotationsRemaining: 0, 228 parametr: par, 229 parf: parF, 230 data: wds_params[wds].wds_data, 231 autoPlay: wds_params[wds].interval * 1000, 232 interval: wds_params[wds].slideshow_interval * 1000, 233 imagecount: wds_params[wds].carousel_image_counts, 234 wds_number: wds_params[wds].wds, 235 startingFeature: wds_currentCenterNum[wds], 236 carouselSpeed: wds_params[wds].wds_transition_duration, 237 carousel_degree: wds_params[wds].carousel_degree, 238 carousel_grayscale: wds_params[wds].carousel_grayscale, 239 carousel_transparency: wds_params[wds].carousel_transparency, 240 borderWidth: 0 241 }); 242} 243 244function wds_show_thumb(key, wds) { 245 var data = wds_params[wds].wds_data[key]; 246 var full_width = wds_params[wds].wds_data[key]["full_width"]; 247 var bull_position = wds_params[wds].wds_data[key]["bull_position"]; 248 var image_url = data["image_url"]; 249 var dot_conteiner_width = jQuery('.wds_slideshow_dots_container_' + wds).width() / 2; 250 var dot_conteiner_height = jQuery('.wds_slideshow_dots_container_' + wds).height(); 251 var wds_bulframe_width = jQuery('.wds_bulframe_' + wds).width() / 2; 252 var dot_position = jQuery('#wds_dots_' + key + '_' + wds).position(); 253 var dot_width = jQuery('#wds_dots_' + key + '_' + wds).width() / 2; 254 dot_position = dot_position.left; 255 var childPos = jQuery('#wds_dots_' + key + '_' + wds).offset(); 256 var parentPos = jQuery('.wds_slideshow_dots_thumbnails_' + wds).parent().offset(); 257 var childOffset = childPos.left - parentPos.left; 258 var right_offset = 0; 259 var rt = (dot_conteiner_width * 2) - childOffset; 260 if (wds_bulframe_width >= rt && rt > 0) { 261 right_offset = wds_bulframe_width - rt; 262 dot_width = 0; 263 } 264 if (full_width == '1') { 265 if (wds_bulframe_width >= childOffset) { 266 wds_bulframe_width = childOffset - parentPos.left; 267 dot_width = 0; 268 } 269 } 270 else { 271 if (wds_bulframe_width >= childOffset) { 272 wds_bulframe_width = childOffset; 273 dot_width = 0; 274 } 275 } 276 dot_position = childOffset - wds_bulframe_width + dot_width - right_offset; 277 jQuery('.wds_bulframe_' + wds).css({ 278 'position': 'absolute', 279 'z-index': '9999', 280 'left': dot_position, 281 'background-image': 'url("' + image_url + '")', 282 'background-size': 'contain', 283 'background-repeat': 'no-repeat', 284 'background-position': 'center center' 285 }); 286 jQuery('.wds_bulframe_' + wds).css(bull_position, dot_conteiner_height); 287 jQuery('.wds_bulframe_' + wds).fadeIn(); 288} 289 290function wds_hide_thumb(wds) { 291 jQuery('.wds_bulframe_' + wds).css({'background-image':''}); 292 jQuery('.wds_bulframe_' + wds).fadeOut(); 293} 294 295function wds_get_overall_parent(obj) { 296 if (obj.parent().width()) { 297 obj.width(obj.parent().width()); 298 return obj.parent().width(); 299 } 300 else { 301 return wds_get_overall_parent(obj.parent()); 302 } 303} 304 305function wds_set_text_dots_cont(wds) { 306 var wds_bull_width = 0; 307 jQuery(".wds_slideshow_dots_" + wds).each(function(){ 308 wds_bull_width += jQuery(this).outerWidth() + 2 * parseInt(j
308Query(this).css("margin-left")); 309 }); 310 jQuery(".wds_slideshow_dots_thumbnails_" + wds).css({width: wds_bull_width}); 311} 312 313/* Generate background position for Zoom Fade effect.*/ 314function wds_genBgPos(current_key, wds, slideshow_interval) { 315 var bgSizeArray = [0, 70]; 316 var bgSize = bgSizeArray[Math.floor(Math.random() * bgSizeArray.length)]; 317 var bgPosXArray = ['left', 'right']; 318 var bgPosYArray = ['top', 'bottom']; 319 var bgPosX = bgPosXArray[Math.floor(Math.random() * bgPosXArray.length)]; 320 var bgPosY = bgPosYArray[Math.floor(Math.random() * bgPosYArray.length)]; 321 var container = jQuery(current_key + " .wds_slideshow_image_" + wds); 322 var container_width = container.width(); 323 var container_height = container.height(); 324 var ver_hor_type = ''; 325 var backgroundSize = (100 + bgSize) + "% " + "auto"; 326 if( container_width <= container_height ) { 327 ver_hor_type = 'v'; 328 backgroundSize = "auto " + (100 + bgSize) + "%"; 329 } 330 container.css({ 331 backgroundPosition: bgPosX + " " + bgPosY, 332 backgroundSize: backgroundSize, 333 webkitAnimation: ' wdszoom' + bgSize + ' ' + Math.floor(1.1 * slideshow_interval) + 's linear 0s alternate infinite', 334 mozAnimation: ' wdszoom' + ver_hor_type + bgSize + ' ' + Math.floor(1.1 * slideshow_interval) + 's linear 0s alternate infinite', 335 animation: ' wdszoom' + ver_hor_type + bgSize + ' ' + Math.floor(1.1 * slideshow_interval) + 's linear 0s alternate infinite' 336 }); 337} 338 339/* For browsers that does not support transitions.*/ 340function wds_fallback(wds, current_image_class, next_image_class, direction, wds, wds_transition_duration) { 341 wds_fade(current_image_class, next_image_class, direction); 342} 343 344function wds_fade(wds, current_image_class, next_image_class, direction) { 345 var container = {}; 346 /* Set active thumbnail.*/ 347 wds_set_filmstrip_class(wds); 348 wds_set_dots_class(wds); 349 if (wds_testBrowser_cssTransitions()) { 350 jQuery(next_image_class).css('transition', 'opacity ' + wds_params[wds].wds_transition_duration + 'ms linear'); 351 jQuery(current_image_class).css({'opacity': 0, 'z-index': 1}); 352 jQuery(next_image_class).css({'opacity': 1, 'z-index': 2}); 353 } 354 else { 355 jQuery(current_image_class).animate({'opacity': 0, 'z-index': 1}, wds_params[wds].wds_transition_duration); 356 jQuery(next_image_class).animate({ 357 'opacity': 1, 358 'z-index': 2 359 }, { 360 duration: wds_params[wds].wds_transition_duration, 361 complete: function () { 362 } 363 }); 364 /* For IE.*/ 365 jQuery(current_image_class).fadeTo(wds_params[wds].wds_transition_duration, 0); 366 jQuery(next_image_class).fadeTo(wds_params[wds].wds_transition_duration, 1); 367 } 368 369 jQuery.each( wds_params[wds].callback_items, function( index, value ) { 370 if ( index === 'onSliderCE' && value !== '' ) { 371 var wds_callback_f = new Function( wds_params[wds].callback_items.onSliderCE ); 372 wds_callback_f(); 373 } 374 }); 375} 376 377/* For browsers that support transitions, but not 3d transforms (only used if primary transition makes use of 3d-transforms).*/ 378function wds_fallback3d(wds, urrent_image_class, next_image_class, direction) { 379 wds_sliceV(wds, current_image_class, next_image_class, direction); 380} 381 382function wds_sliceV(wds, current_image_class, next_image_class, direction) { 383 if (direction == 'right') { 384 var translateY = 'min-auto'; 385 } 386 else if (direction == 'left') { 387 var translateY = 'auto'; 388 } 389 wds_grid(wds, 10, 1, 0, 0, translateY, 1, 0, current_image_class, next_image_class, direction, 0, 0, 'ease-in-out'); 390} 391 392function wds_grid(wds, cols, rows, ro, tx, ty, sc, op, current_image_class, next_image_class, direction, random, roy, easing) { 393 /* If browser does not support CSS transitions.*/ 394 if (!wds_testBrowser_cssTransitions()) { 395 return wds_fallback(current_image_class, next_image_class, direction); 396 } 397 wds_params[wds].wds_trans_in_progress = true; 398 /* Set active thumbnail.*/ 399 wds_set_filmstrip_class(wds); 400 wds_set_dots_class(wds); 401 /* The time (in ms) added to/subtracted from the delay total for each new gridlet.*/ 402 var count = (wds_params[wds].wds_transition_duration) / (cols + rows); 403 404 /* Gridlet creator (divisions of the image grid, positioned with background-images to replicate the look of an entire slide image when assembled)*/ 405 function wds_gridlet(wds, width, height, top, img_top, left, img_left, src, imgWidth, imgHeight, c, r) {
406 var delay = random ? Math.floor((cols + rows) * count * Math.random()) : (c + r) * count; 407 /* Return a gridlet elem with styles for specific transition.*/ 408 var grid_div = jQuery('<span class="wds_gridlet_' + wds + '" />').css({ 409 display: "block", 410 width: imgWidth, /*"100%"*/ 411 height: jQuery(".wds_slideshow_image_spun_" + wds).height() + "px", 412 top: -top, 413 left: -left, 414 backgroundImage: src, 415 backgroundSize: jQuery(".wds_slideshow_image_" + wds).css("background-size"), 416 backgroundPosition: jQuery(".wds_slideshow_image_" + wds).css("background-position"), 417 backgroundRepeat: 'no-repeat' 418 }); 419 return jQuery('<span class="wds_gridlet_' + wds + '" />').css({ 420 display: "block", 421 width: width, /*"100%"*/ 422 height: height, 423 top: top, 424 left: left, 425 backgroundSize: imgWidth + 'px ' + imgHeight + 'px', 426 backgroundPosition: img_left + 'px ' + img_top + 'px', 427 backgroundRepeat: 'no-repeat', 428 overflow: "hidden", 429 transition: 'all ' + wds_params[wds].wds_transition_duration + 'ms ' + easing + ' ' + delay + 'ms', 430 transform: 'none' 431 }).append(grid_div); 432 } 433 434 /* Get the current slide's image.*/ 435 var cur_img = jQuery(current_image_class).find('span[data-img-id^="wds_slideshow_image"]'); 436 /* Create a grid to hold the gridlets.*/ 437 var grid = jQuery('<span style="display: block;" />').addClass('wds_grid_' + wds); 438 /* Prepend the grid to the next slide (i.e. so it's above the slide image).*/ 439 jQuery(current_image_class).prepend(grid); 440 /* vars to calculate positioning/size of gridlets*/ 441 var cont = jQuery(".wds_slide_bg_" + wds); 442 var imgWidth = cur_img.width(); 443 var imgHeight = cur_img.height(); 444 var contWidth = cont.width(), 445 contHeight = cont.height(), 446 imgSrc = cur_img.css('background-image'), /*.replace('/thumb', ''),*/
447 colWidth = Math.floor(contWidth / cols), 448 rowHeight = Math.floor(contHeight / rows), 449 colRemainder = contWidth - (cols * colWidth), 450 colAdd = Math.ceil(colRemainder / cols), 451 rowRemainder = contHeight - (rows * rowHeight), 452 rowAdd = Math.ceil(rowRemainder / rows), 453 leftDist = 0, 454 img_leftDist = (jQuery(".wds_slide_bg_" + wds).width() - cur_img.width()) / 2; 455 /* tx/ty args can be passed as 'auto'/'min-auto' (meaning use slide width/height or negative slide width/height).*/ 456 tx = tx === 'auto' ? contWidth : tx; 457 tx = tx === 'min-auto' ? -contWidth : tx; 458 ty = ty === 'auto' ? contHeight : ty; 459 ty = ty === 'min-auto' ? -contHeight : ty; 460 /* Loop through cols*/ 461 for (var i = 0; i < cols; i++) { 462 var topDist = 0, 463 img_topDst = (jQuery(".wds_slide_bg_" + wds).height() - cur_img.height()) / 2, 464 newColWidth = colWidth; 465 /* If imgWidth (px) does not divide cleanly into the specified number of cols, adjust individual col widths to create correct total.*/ 466 if (colRemainder > 0) { 467 var add = colRemainder >= colAdd ? colAdd : colRemainder; 468 newColWidth += add; 469 colRemainder -= add; 470 } 471 /* Nested loop to create row gridlets for each col.*/ 472 for (var j = 0; j < rows; j++) { 473 var newRowHeight = rowHeight, 474 newRowRemainder = rowRemainder; 475 /* If contHeight (px) does not divide cleanly into the specified number of rows, adju
475st individual row heights to create correct total.*/ 476 if (newRowRemainder > 0) { 477 add = newRowRemainder >= rowAdd ? rowAdd : rowRemainder; 478 newRowHeight += add; 479 newRowRemainder -= add; 480 } 481 /* Create & append gridlet to grid.*/ 482 grid.append(wds_gridlet(wds, newColWidth, newRowHeight, topDist, img_topDst, leftDist, img_leftDist, imgSrc, imgWidth, imgHeight, i, j)); 483 topDist += newRowHeight; 484 img_topDst -= newRowHeight; 485 } 486 img_leftDist -= newColWidth; 487 leftDist += newColWidth; 488 } 489 /* Show grid & hide the image it replaces.*/ 490 grid.show(); 491 cur_img.css('opacity', 0); 492 /* Add identifying classes to corner gridlets (useful if applying border radius).*/ 493 grid.children().first().addClass('rs-top-left'); 494 grid.children().last().addClass('rs-bottom-right'); 495 grid.children().eq(rows - 1).addClass('rs-bottom-left'); 496 grid.children().eq(-rows).addClass('rs-top-right'); 497 /* Execution steps.*/ 498 setTimeout(function () { 499 grid.children().css({ 500 opacity: op, 501 transform: 'rotate(' + ro + 'deg) rotateY(' + roy + 'deg) translateX(' + tx + 'px) translateY(' + ty + 'px) scale(' + sc + ')' 502 }); 503 }, 1); 504 jQuery(next_image_class).css('opacity', 1); 505 /* After transition.*/ 506 var cccount = 0; 507 var obshicccount = cols * rows; 508 grid.children().one('webkitTransitionEnd transitionend otransitionend oTransitionEnd mstransitionend', jQuery.proxy(wds_after_trans_each)); 509 510 function wds_after_trans_each(wds) { 511 if (++cccount == obshicccount) { 512 wds_after_trans(wds); 513 } 514 } 515 516 function wds_after_trans() { 517 jQuery(current_image_class).css({'opacity': 0, 'z-index': 1}); 518 jQuery(next_image_class).css({'opacity': 1, 'z-index': 2}); 519 cur_img.css('opacity', 1); 520 grid.remove(); 521 wds_params[wds].wds_trans_in_progress = false; 522 if (typeof wds_params[wds].wds_event_stack !== 'undefined') { 523 if (wds_params[wds].wds_event_stack.length > 0) { 524 key = wds_params[wds].wds_event_stack[0].split("-"); 525 wds_params[wds].wds_event_stack.shift(); 526 wds_change_image(wds, key[0], key[1], wds_params[wds].wds_data, true, direction); 527 } 528 } 529 jQuery.each( wds_params[wds].callback_items, function( index, value ) { 530 if ( index === 'onSliderCE' && value !== '' ) { 531 var wds_callback_f = new Function( wds_params[wds].callback_items.onSliderCE ); 532 wds_callback_f(); 533 } 534 }); 535 } 536} 537 538function wds_change_image(wds, current_key, key, wds_data, from_effect, btn) { 539 if (typeof btn == "undefined") { 540 var btn = ""; 541 } 542 if (!(wds_params[wds].carousel != 0 || wds_data[key]["is_video"] != 'image') && !wds_data[key]["loaded"]) { 543 jQuery('<img />').attr("src", wds_data[key]["image_url"]) 544 .on('load', function () { 545 jQuery(this).remove(); 546 wds_change_image_when_loaded(wds, current_key, key, wds_data, from_effect, btn); 547 }) 548 .on('error', function () { 549 jQuery(this).remove(); 550 wds_change_image_when_loaded(wds, current_key, key, wds_data, from_effect, btn); 551 }); 552 wds_data[key]["loaded"] = true; 553 } 554 else { 555 wds_change_image_when_loaded(wds, current_key, key, wds_data, from_effect, btn); 556 } 557} 558 559function wds_play_wds(wds) { 560 wds_params[wds].wds_play_pause_state = 0; 561 /* Play.*/ 562 jQuery(".wds_slideshow_play_pause_" + wds).attr("title", wds_object.pause); 563 jQuery(".wds_slideshow_play_pause_" + wds).attr("class", "wds_ctrl_btn_" + wds + " wds_slideshow_play_pause_" + wds + " fa fa-pause"); 564 /* Finish current animation and begin the other.*/ 565 if (wds_params[wds].enable_slideshow_autoplay) { 566 if (wds_params[wds].timer_bar_type != 'top') { 567 if (wds_params[wds].timer_bar_type != 'bottom') { 568 if (typeof wds_params[wds].circle_timer_animate !== 'undefined') { 569 wds_params[wds].circle_timer_animate.stop(); 570 } 571 wds_circle_timer(wds_params[wds].curent_time_deggree); 572 } 573 } 574 } 575 play_wds(wds); 576 if (wds_params[wds].enable_slideshow_music) { 577 if (wds_params[wds].slideshow_music_url != '') { 578 document.getElementById("wds_audio_" + wds).play(); 579 } 580 } 581} 582 583function play_wds(wds) { 584 if (wds_params[wds].timer_bar_type != 'none') { 585 if (wds_params[wds].enable_slideshow_autoplay || jQuery('.wds_ctrl_btn_' + wds).hasClass('fa-pause')) { 586 jQuery(".wds_line_timer_" + wds).animate({ 587 width: "100%" 588 }, { 589 duration: wds_params[wds].slideshow_interval * 1000, 590 specialEasing: {width: "linear"} 591 }); 592 } 593 } 594 window.clearInterval(wds_params[wds].wds_playInterval); 595 /* Play.*/ 596 wds_params[wds].wds_playInterval = setInterval(function () {
597 var curr_img_index = parseInt(jQuery('#wds_current_image_key_' + wds).val()); 598 if (wds_params[wds].slider_loop == 0) { 599 if (wds_params[wds].twoway_slideshow) { 600 if (wds_params[wds].wds_global_btn_wds == "left") { 601 if (curr_img_index == 0) { 602 return false; 603 } 604 } 605 else { 606 if (curr_img_index == wds_params[wds].slides_count - 1) { 607 return false; 608 } 609 } 610 } 611 else { 612 if (curr_img_index == wds_params[wds].slides_count - 1) { 613 return false; 614 } 615 } 616 } 617 if ( typeof wds_params[wds].wds_data[parseInt(jQuery('#wds_current_image_key_' + wds).val())] != "undefined") { 618 var curr_img_id = wds_params[wds].wds_data[parseInt(jQuery('#wds_current_image_key_' + wds).val())]["id"]; 619 } 620 wds_params[wds].video_is_playing = false; 621 jQuery("#wds_image_id_" + wds + "_" + curr_img_id).find("video").each(function () { 622 if (!this.paused) { 623 wds_params[wds].video_is_playing = true; 624 } 625 }); 626 jQuery("#wds_image_id_" + wds + "_" + curr_img_id).find("iframe[data-type='youtube']").each(function () { 627 player = wds_params[wds].youtube_iframes_ids.indexOf(this.id); 628 if (typeof wds_params[wds].youtube_iframes[player] != "undefined") { 629 if (typeof wds_params[wds].youtube_iframes[player].getPlayerState == "function") { 630 if (wds_params[wds].youtube_iframes[player].getPlayerState() == 1) { 631 wds_params[wds].video_is_playing = true; 632 } 633 } 634 } 635 }); 636 iframe_message_sent_wds = 0; 637 wds_params[wds].iframe_message_received = 0; 638 jQuery("#wds_image_id_" + wds + "_" + curr_img_id).find("iframe[data-type='vimeo']").each(function () { 639 jQuery(this)[0].contentWindow.postMessage('{ "method": "paused" }', "*"); 640 iframe_message_sent_wds = iframe_message_sent_wds + 1; 641 }); 642 643 function wds_call_change() { 644 if (!wds_params[wds].video_is_playing) { 645 var iterator = 1;
646 var img_index = (parseInt(jQuery('#wds_current_image_key_' + wds).val()) + iterator) % wds_params[wds].wds_data.length; 647 if (wds_params[wds].enable_slideshow_shuffle) { 648 iterator = Math.floor((wds_params[wds].wds_data.length - 1) * Math.random() + 1); 649 } 650 else if (wds_params[wds].twoway_slideshow) { 651 if (wds_params[wds].wds_global_btn_wds == "left") { 652 iterator = -1; 653 } 654 } 655 img_index = (parseInt(jQuery('#wds_current_image_key_' + wds).val()) + iterator) >= 0 ? (parseInt(jQuery('#wds_current_image_key_' + wds).val()) + iterator) % wds_params[wds].wds_data.length : wds_params[wds].wds_data.length - 1; 656 wds_change_image(wds, parseInt(jQuery('#wds_current_image_key_' + wds).val()), img_index, wds_params[wds].wds_data); 657 if (wds_params[wds].carousel == 1) { 658 wds_carousel[wds].next(); 659 } 660 } 661 } 662 663 function wds_check_message_received() { 664 return iframe_message_sent_wds == wds_params[wds].iframe_message_received ? true : false; 665 } 666 667 function wds_call(wds_condition, wds_callback) { 668 if (wds_condition()) { 669 wds_callback(); 670 } 671 else { 672 setTimeout(function () { 673 wds_call(wds_condition, wds_callback); 674 }, 10); 675 } 676 } 677 678 wds_call(wds_check_message_received, wds_call_change); 679 }, parseInt(wds_params[wds].slideshow_interval * 1000) + wds_params[wds].wds_duration_for_change); 680} 681 682function wds_change_image_when_loaded(wds, current_key, key, wds_data, from_effect, btn) { 683 if (wds_params[wds].carousel == 1) { 684 if (wds_currentlyMoving[wds] == true) { 685 return; 686 } 687 } 688 /* Pause videos.*/ 689 jQuery("#wds_slideshow_image_container_" + wds).find("iframe").each(function () { 690 if (typeof jQuery(this)[0].contentWindow != "undefined") { 691 if (jQuery(this).data('type') == 'youtube') { 692 player = wds_params[wds].youtube_iframes_ids.indexOf(this.id); 693 if (typeof wds_params[wds].youtube_iframes[player] != "undefined" && wds_done) { 694 wds_params[wds].youtube_iframes[player].stopVideo(); 695 } 696 } 697 else if (jQuery(this).data('type') == 'vimeo') { 698 jQuery(this)[0].contentWindow.postMessage('{ "method": "pause" }', "*"); 699 } 700 else { 701 jQuery(this)[0].contentWindow.postMessage('stop', '*'); 702 } 703 } 704 }); 705 jQuery("#wds_slideshow_image_container_" + wds).find("video").each(function () { 706 jQuery(this).trigger('pause'); 707 jQuery('.wds_bigplay_' + wds).show(); 708 }); 709 /* Pause layer videos.*/ 710 jQuery(".wds_video_layer_frame_" + wds).each(function () { 711 if (typeof jQuery(this)[0].contentWindow != "undefined") { 712 if (jQuery(this).data('type') == 'youtube') { 713 player = wds_params[wds].youtube_iframes_ids.indexOf(this.id); 714 if (typeof wds_params[wds].youtube_iframes[player] != "undefined") { 715 wds_params[wds].youtube_iframes[player].stopVideo(); 716 } 717 } 718 else if (jQuery(this).data('type') == 'vimeo') { 719 jQuery(this)[0].contentWindow.postMessage('{ "method": "pause" }', "*"); 720 } 721 else { 722 jQuery(this)[0].contentWindow.postMessage('stop', '*'); 723 } 724 } 725 }); 726 727 if (wds_data[key]) { 728 729 if (jQuery('.wds_ctrl_btn_' + wds).hasClass('fa-pause') || wds_params[wds].autoplay) { 730 play_wds(wds); 731 } 732 if (!from_effect) { 733 /* Change image key.*/ 734 jQuery("#wds_current_image_key_" + wds).val(key); 735 if (current_key == '-1') { /* Filmstrip.*/ 736 current_key = jQuery(".wds_slideshow_thumb_active_" + wds).children("img").attr("data-image-key"); 737 } 738 else if (current_key == '-2') { /* Dots.*/ 739 currId = jQuery(".wds_slideshow_dots_active_" + wds).attr("id"); 740 current_key = currId.replace('wds_dots_', '').replace('_' + wds, ''); 741 } 742 } 743 if (wds_params[wds].wds_trans_in_progress) { 744 wds_params[wds].wds_event_stack.push(current_key + '-' + key); 745 return; 746 } 747 if (btn == "") { 748 var direction = "right"; 749 var int_curr_key = parseInt(wds_params[wds].wds_current_key); 750 var int_key = parseInt(key); 751 var last_pos = wds_data.length - 1; 752 if (int_curr_key > int_key) { 753 direction = 'left'; 754 } 755 else if (int_curr_key == int_key && wds_zoomfade_first_img !== 0) { 756 return; 757 } 758 /* From last slide to first.*/ 759 if (int_key == 0) { 760 if (int_curr_key == last_pos) { 761 direction = 'right'; 762 } 763 } 764 /* From first slide to last if there are more than two slides in the slider.*/ 765 if (int_key == last_pos) { 766 if (int_curr_key == 0) { 767 if (last_pos > 1) { 768 direction = 'left'; 769 } 770 } 771 } 772 } 773 else { 774 direction = btn; 775 } 776 if (wds_params[wds].twoway_slideshow) { 777 wds_params[wds].wds_global_btn_wds = direction; 778 } 779 /* Set active thumbnail position.*/ 780 if (wds_params[wds].width_or_height == 'width') { 781 wds_params[wds].wds_current_filmstrip_pos = key * (jQuery(".wds_slideshow_filmstrip_thumbnail_" + wds).width() + 2 + 2 * 0); 782 } 783 else { 784 wds_params[wds].wds_current_filmstrip_pos = key * (jQuery(".wds_slideshow_filmstrip_thumbnail_" + wds).height() + 2 + 2 * 0); 785 } 786 wds_params[wds].wds_current_key = key; 787 /* Change image id.*/ 788 jQuery("div[data-img-id=wds_slideshow_image_" + wds + "]").attr('data-image-id', wds_data[key]["id"]); 789 if(typeof wds_data[current_key] != "undefined"){ 790 var current_image_class = "#wds_image_id_" + wds + "_" + wds_data[current_key]["id"]; 791 } 792 var next_image_class = "#wds_image_id_" + wds + "_" + wds_data[key]["id"]; 793 var next_image_type = wds_data[key]["is_video"]; 794 if (next_image_type == 'video' || next_image_type.indexOf('EMBED') >= 0) { 795 jQuery('.wds_pp_btn_cont').hide(); 796 } 797 else { 798 jQuery('.wds_pp_btn_cont').show(); 799 } 800 if (wds_data[key]["target_attr_slide"] == 1) { 801 wds_embed_slide_autoplay(next_image_class, wds); 802 } 803 if (wds_params[wds].preload_images && !wds_params[wds].carousel) { 804 if (wds_data[key]["is_video"] == 'image') { 805 jQuery(next_image_class).find(".wds_slideshow_image_" + wds).css("background-image", 'url("' + wds_data[key]["image_url"] + '")'); 806 } 807 else if (wds_data[key]["is_video"] == 'EMBED_OEMBED_INSTAGRAM_IMAGE') { 808 jQuery(next_image_class).find(".wds_slideshow_image_" + wds).css("background-image", 'url("//instagram.com/p/' + wds_data[key]["image_url"] + '/media/?size=l")'); 809 } 810 } 811 wds_video_dimenstion(wds, key); 812 if(typeof wds_data[current_key] != "undefined"){ 813 var current_slide_layers_count = wds_data[current_key]["slide_layers_count"]; 814 } 815 var next_slide_layers_count = wds_data[key]["slide_layers_count"]; 816 817 /* Clear layers before image change.*/ 818 function set_layer_effect_out_before_change(wds, m) { 819 wds_params[wds].wds_clear_layers_effects_out_before_change[current_key][m] = setTimeout(function () { 820 if (wds_data[current_key]["layer_" + m + "_type"] != 'social') {
821 if (jQuery('#wds_' + wds + '_slide' + wds_data[current_key]["id"] + '_layer' + wds_data[current_key]["layer_" + m + "_id"]).prev().attr('id') != 'wds_' + wds + '_slide' + wds_data[current_key]["id"] + '_layer' + wds_data[current_key]["layer_" + m + "_id"] + '_round_effect') { 822 jQuery('#wds_' + wds + '_slide' + wds_data[current_key]["id"] + '_layer' + wds_data[current_key]["layer_" + m + "_id"]).css('-webkit-animation-duration', 0.6 + 's').css('animation-duration', 0.6 + 's'); 823 jQuery('#wds_' + wds + '_slide' + wds_data[current_key]["id"] + '_layer' + wds_data[current_key]["layer_" + m + "_id"]).removeClass().addClass(wds_data[current_key]["layer_" + m + "_layer_effect_out"] + ' wds_animated'); 824 jQuery('#wds_' + wds + '_slide' + wds_data[current_key]["id"] + '_layer' + wds_data[current_key]["layer_" + m + "_id"]).addClass(jQuery('#wds_' + wds + '_slide' + wds_data[current_key]["id"] + '_layer' + wds_data[current_key]["layer_" + m + "_id"]).data("class")); 825 } 826 else { 827 jQuery('#wds_' + wds + '_slide' + wds_data[current_key]["id"] + '_layer' + wds_data[current_key]["layer_" + m + "_id"] + "_div").css('-webkit-animation-duration', 0.6 + 's').css('animation-duration', 0.6 + 's'); 828 jQuery('#wds_' + wds + '_slide' + wds_data[current_key]["id"] + '_layer' + wds_data[current_key]["layer_" + m + "_id"] + "_div").removeClass().addClass(wds_data[current_key]["layer_" + m + "_layer_effect_out"] + ' wds_animated'); 829 } 830 } 831 else { 832 jQuery('#wds_' + wds + '_slide' + wds_data[current_key]["id"] + '_layer' + wds_data[current_key]["layer_" + m + "_id"]).css('-webkit-animation-duration', 0.6 + 's').css('animation-duration', 0.6 + 's'); 833 jQuery('#wds_' + wds + '_slide' + wds_data[current_key]["id"] + '_layer' + wds_data[current_key]["layer_" + m + "_id"]).removeClass().addClass(wds_data[current_key]["layer_" + m + "_layer_effect_out"] + ' fa fa-' + wds_data[current_key]["layer_" + m + "_social_button"] + ' wds_animated'); 834 } 835 836 }, 10); 837 } 838 839 if (wds_params[wds].layer_out_next) { 840 for (var m = 0; m < current_slide_layers_count; m++) {
841 if (jQuery('#wds_' + wds + '_slide' + wds_data[current_key]["id"] + '_layer' + wds_data[current_key]["layer_" + m + "_id"]).prev().attr('id') != 'wds_' + wds + '_slide' + wds_data[current_key]["id"] + '_layer' + wds_data[current_key]["layer_" + i + "_id"] + '_round_effect') { 842 if (jQuery('#wds_' + wds + '_slide' + wds_data[current_key]["id"] + '_layer' + wds_data[current_key]["layer_" + m + "_id"]).css('opacity') != 0) { 843 set_layer_effect_out_before_change(wds, m); 844 } 845 } 846 else { 847 if (jQuery('#wds_' + wds + '_slide' + wds_data[current_key]["id"] + '_layer' + wds_data[current_key]["layer_" + m + "_id"] + "_div").css('opacity') != 0) { 848 set_layer_effect_out_before_change(wds, m); 849 } 850 } 851 } 852 } 853 854 /* Loop through current slide layers for clear effects.*/ 855 setTimeout(function () { 856 for (var k = 0; k < current_slide_layers_count; k++) { 857 clearTimeout(wds_params[wds].wds_clear_layers_effects_in[current_key][k]); 858 clearTimeout(wds_params[wds].wds_clear_layers_effects_out[current_key][k]); 859 if (wds_data[current_key]["layer_" + k + "_type"] != 'social') { 860 if(wds_data[current_key]["layer_" + k + "_type"] == 'hotspots') { 861 jQuery('#wds_' + wds + '_slide' + wds_data[current_key]["id"] + '_layer' + wds_data[current_key]["layer_" + k + "_id"]+'_div').removeClass().addClass('hotspot_container wds_layer_' + wds_data[current_key]["layer_" + k + "_id"]+'_div'); 862 } else { 863 jQuery('#wds_' + wds + '_slide' + wds_data[current_key]["id"] + '_layer' + wds_data[current_key]["layer_" + k + "_id"]).removeClass().addClass('wds_layer_' + wds_data[current_key]["layer_" + k + "_id"]); 864 } 865 } 866 else { 867 jQuery('#wds_' + wds + '_slide' + wds_data[current_key]["id"] + '_layer' + wds_data[current_key]["layer_" + k + "_id"]).removeClass().addClass('fa fa-' + wds_data[current_key]["layer_" + k + "_social_button"] + ' wds_layer_' + wds_data[current_key]["layer_" + k + "_id"]); 868 } 869 } 870 }, wds_params[wds].wds_duration_for_clear_effects); 871 872 /* Loop through layers in.*/ 873 for (var j = 0; j < next_slide_layers_count; j++) { 874 wds_set_layer_effect_in_wds(wds, j, key); 875 } 876 877 /* Loop through layers out if pause button not pressed.*/ 878 for (var i = 0; i < next_slide_layers_count; i++) { 879 wds_set_layer_effect_out_wds(wds, i, key); 880 } 881 882 setTimeout(function () { 883 if (typeof jQuery().finish !== 'undefined') { 884 if (jQuery.isFunction(jQuery().finish)) { 885 jQuery(".wds_line_timer_" + wds).finish(); 886 } 887 } 888 jQuery(".wds_line_timer_" + wds).css({width: 0}); 889 if (!wds_params[wds].carousel) { 890 if (typeof window[wds_params[wds].wds_slideshow_effect] == 'function') { 891 window[wds_params[wds].wds_slideshow_effect](wds, current_image_class, next_image_class, direction); 892 } 893 else { 894 wds_none(wds, current_image_class, next_image_class, direction); 895 } 896 } 897 if (wds_params[wds].timer_bar_type != 'none') { 898 899 if (wds_params[wds].enable_slideshow_autoplay || jQuery('.wds_ctrl_btn_' + wds).hasClass('fa-pause')) { 900 if (wds_params[wds].timer_bar_type == 'top' || wds_params[wds].timer_bar_type == 'bottom') { 901 if (!jQuery(".wds_ctrl_btn_" + wds).hasClass("fa-play")) { 902 jQuery(".wds_line_timer_" + wds).animate({ 903 width: "100%" 904 }, { 905 duration: wds_params[wds].slideshow_interval * 1000, 906 specialEasing: {width: "linear"} 907 }); 908 } 909 } 910 else if (wds_params[wds].timer_bar_type != 'none') { 911 if (typeof wds_params[wds].circle_timer_animate !== 'undefined') { 912 wds_params[wds].circle_timer_animate.stop(); 913 } 914 jQuery('#top_right_' + wds).css({ 915 '-moz-transform': 'rotate(0deg)', 916 '-webkit-transform': 'rotate(0deg)', 917 '-o-transform': 'rotate(0deg)', 918 '-ms-transform': 'rotate(0deg)', 919 'transform': 'rotate(0deg)',
920 '-webkit-transform-origin': 'left bottom', 921 '-ms-transform-origin': 'left bottom', 922 '-moz-transform-origin': 'left bottom', 923 'transform-origin': 'left bottom' 924 }); 925 jQuery('#bottom_right_' + wds).css({ 926 '-moz-transform': 'rotate(0deg)', 927 '-webkit-transform': 'rotate(0deg)', 928 '-o-transform': 'rotate(0deg)', 929 '-ms-transform': 'rotate(0deg)', 930 'transform': 'rotate(0deg)', 931 '-webkit-transform-origin': 'left top', 932 '-ms-transform-origin': 'left top', 933 '-moz-transform-origin': 'left top', 934 'transform-origin': 'left top' 935 }); 936 jQuery('#bottom_left_' + wds).css({ 937 '-moz-transform': 'rotate(0deg)', 938 '-webkit-transform': 'rotate(0deg)', 939 '-o-transform': 'rotate(0deg)', 940 '-ms-transform': 'rotate(0deg)', 941 'transform': 'rotate(0deg)', 942 '-webkit-transform-origin': 'right top', 943 '-ms-transform-origin': 'right top', 944 '-moz-transform-origin': 'right top', 945 'transform-origin': 'right top' 946 }); 947 jQuery('#top_left_' + wds).css({ 948 '-moz-transform': 'rotate(0deg)', 949 '-webkit-transform': 'rotate(0deg)', 950 '-o-transform': 'rotate(0deg)', 951 '-ms-transform': 'rotate(0deg)', 952 'transform': 'rotate(0deg)', 953 '-webkit-transform-origin': 'right bottom', 954 '-ms-transform-origin': 'right bottom', 955 '-moz-transform-origin': 'right bottom', 956 'transform-origin': 'right bottom' 957 }); 958 if (!jQuery(".wds_ctrl_btn_" + wds).hasClass("fa-play")) { 959 /* Begin circle timer on next.*/ 960 wds_circle_timer(0); 961 } 962 else { 963 wds_params[wds].curent_time_deggree = 0; 964 } 965 } 966 } 967 } 968 if (wds_params[wds].filmstrip_position != 'none' && wds_params[wds].slides_count > 1) { 969 wds_move_filmstrip(wds); 970 } 971 972 if (wds_params[wds].bull_position != 'none' && wds_params[wds].slides_count > 1) { 973 wds_move_dots(wds); 974 } 975 if (wds_params[wds].wds_data[key]["is_video"] != 'image') { 976 jQuery("#wds_slideshow_play_pause_" + wds).css({display: 'none'}); 977 } 978 else { 979 jQuery("#wds_slideshow_play_pause_" + wds).css({display: ''}); 980 } 981 }, wds_params[wds].wds_duration_for_change); 982 } 983 if (wds_params[wds].parallax_effect == 1) { 984 wds_parallax(wds); 985 } 986 987 if (wds_params[wds].slider_effect == 'zoomFade') { 988 wds_genBgPos(next_image_class, wds, wds_params[wds].slideshow_interval); 989 wds_zoomfade_first_img = 1; 990 } 991 wds_window_fixed_size(wds, next_image_class); 992 993 jQuery.each( wds_params[wds].callback_items, function( index, value ) { 994 if ( index === 'onSliderCS' && value !== '' ) { 995 var wds_callback_f = new Function( wds_params[wds].callback_items.onSliderCS ); 996 wds_callback_f(); 997 } 998 }); 999} 1000 1001function wds_blindR(wds, current_image_class, next_image_class, direction) { 1002 wds_grid(wds, 8, 1, 0, 0, 0, 1, 1, current_image_class, next_image_class, direction, 1, 90, 'ease-in-out'); 1003} 1004 1005function wds_parallelSlideH(wds, current_image_class, next_image_class, direction) { 1006 var width = jQuery(current_image_class).width(); 1007 var height = jQuery(current_image_class).height(); 1008 if (direction == 'right') { 1009 wds_parallelSlide(wds, width, 0, -width, 0, current_image_class, next_image_class, direction, 'ease-in-out'); 1010 } 1011 else if (direction == 'left') { 1012 wds_parallelSlide(wds, -width, 0, width, 0, current_image_class, next_image_class, direction, 'ease-in-out'); 1013 } 1014} 1015 1016function wds_parallelSlideV(wds, current_image_class, next_image_class, direction) { 1017 var width = jQuery(current_image_class).width(); 1018 var height = jQuery(current_image_class).height(); 1019 if (direction == 'right') { 1020 wds_parallelSlide(wds, 0, height, 0, -height, current_image_class, next_image_class, direction, 'ease-in-out'); 1021 } 1022 else if (direction == 'left') { 1023 wds_parallelSlide(wds, 0, -height, 0, height, current_image_class, next_image_class, direction, 'ease-in-out'); 1024 } 1025} 1026 1027function wds_slic3DH(wds, current_image_class, next_image_class, direction) { 1028 var dimension = jQuery(current_image_class).width() / 2; 1029 if (direction == 'right') { 1030 wds_grid3d(wds, 1, 5, dimension, 0, -90, 0, dimension, 90, 0, current_image_class, next_image_class, direction, 0, 'cubic-bezier(0.785, 0.135, 0.150, 0.860)'); 1031 } 1032 else if (direction == 'left') { 1033 wds_grid3d(wds, 1, 5, dimension, 0, 90, 0, -dimension, -90, 0, current_image_class, next_image_class, direction, 0, 'cubic-bezier(0.785, 0.135, 0.150, 0.860)'); 1034 } 1035} 1036 1037function wds_slic3DV(wds, current_image_class, next_image_class, direction) { 1038 var dimension = jQuery(current_image_class).height() / 2; 1039 if (direction == 'right') { 1040 wds_grid3d(wds, 10, 1, dimension, -90, 0, -dimension, 0, 0, 90, current_image_class, next_image_class, direction, 0, 'cubic-bezier(0.785, 0.135, 0.150, 0.860)'); 1041 } 1042 else if (direction == 'left') { 1043 wds_grid3d(wds, 10, 1, dimension, 90, 0, dimension, 0, 0, -90, current_image_class, next_image_class, direction, 0, 'cubic-bezier(0.785, 0.135, 0.150, 0.860)'); 1044 } 1045} 1046 1047function wds_slicR3DH(wds, current_image_class, next_image_class, direction) { 1048 var dimension = jQuery(current_image_class).width() / 2; 1049 if (direction == 'right') { 1050 wds_grid3d(wds, 1, 5, dimension, 0, -90, 0, dimension, 90, 0, current_image_class, next_image_class, direction, 1, 'ease-in-out'); 1051 } 1052 else if (direction == 'left') { 1053 wds_grid3d(wds, 1, 5, dimension, 0, 90, 0, -dimension, -90, 0, current_image_class, next_image_class, direction, 1, 'ease-in-out'); 1054 } 1055} 1056 1057function wds_slicR3DV(wds, current_image_class, next_image_class, direction) { 1058 var dimension = jQuery(current_image_class).height() / 2; 1059 if (direction == 'right') { 1060 wds_grid3d(wds, 10, 1, dimension, -90, 0, -dimension, 0, 0, 90, current_image_class, next_image_class, direction, 1, 'ease-in-out'); 1061 } 1062 else if (direction == 'left') { 1063 wds_grid3d(wds, 10, 1, dimension, 90, 0, dimension, 0, 0, -90, current_image_class, next_image_class, direction, 1, 'ease-in-out'); 1064 } 1065} 1066 1067function wds_tilesR(wds, current_image_class, next_image_class, direction) { 1068 wds_grid(wds, 8, 8, 0, 0, 0, 1, 1, current_image_class, next_image_class, direction, 1, 90, 'ease-in-out'); 1069} 1070 1071function wds_blockScaleR(wds, current_image_class, next_image_class, direction) { 1072 wds_grid(wds, 8, 6, 0, 0, 0, 0.6, 0, current_image_class, next_image_class, direction, 1, 0, 'ease-in-out'); 1073} 1074 1075function wds_cubeH(wds, current_image_class, next_image_class, direction) { 1076 /* Set to half of image width.*/ 1077 var dimension = jQuery(current_image_class).width() / 2; 1078 if (direction == 'right') { 1079 wds_cube(wds, dimension, dimension, 0, 0, 90, 0, -90, current_image_class, next_image_class, direction, 'cubic-bezier(0.785, 0.135, 0.150, 0.860)'); 1080 } 1081 else if (direction == 'left') { 1082 wds_cube(wds, dimension, -dimension, 0, 0, -90, 0, 90, current_image_class, next_image_class, direction, 'cubic-bezier(0.785, 0.135, 0.150, 0.860)'); 1083 } 1084} 1085 1086function wds_cubeV(wds, current_image_class, next_image_class, direction) { 1087 /* Set to half of image height.*/ 1088 var dimension = jQuery(current_image_class).height() / 2; 1089 /* If next slide.*/ 1090 if (direction == 'right') { 1091 wds_cube(wds, dimension, 0, -dimension, 90, 0, -90, 0, current_image_class, next_image_class, direction, 'cubic-bezier(0.785, 0.135, 0.150, 0.860)'); 1092 } 1093 else if (direction == 'left') { 1094 wds_cube(wds, dimension, 0, dimension, -90, 0, 90, 0, current_image_class, next_image_class, direction, 'cubic-bezier(0.785, 0.135, 0.150, 0.860)'); 1095 } 1096} 1097 1098function wds_cube(wds, tz, ntx, nty, nrx, nry, wrx, wry, current_image_class, next_image_class, direction, easing) { 1099 /* If browser does not support 3d transforms/CSS transitions.*/ 1100 if (!wds_testBrowser_cssTransitions()) { 1101 return wds_fallback(wds, current_image_class, next_image_class, direction); 1102 } 1103 if (!wds_testBrowser_cssTransforms3d()) { 1104 return wds_fallback3d(wds, current_image_class, next_image_class, direction); 1105 } 1106 wds_params[wds].wds_trans_in_progress = true; 1107 /* Set active thumbnail.*/ 1108 wds_set_filmstrip_class(wds); 1109 wds_set_dots_class(wds); 1110 jQuery(".wds_slide_container_" + wds).css('overflow', 'visible'); 1111 jQuery(".wds_slideshow_image_spun2_" + wds).css('overflow', 'visible'); 1112 jQuery(".wds_slideshow_image_wrap_" + wds).css('overflow', 'visible'); 1113 var filmstrip_position = wds_params[wds].filmstrip_position; 1114 if (filmstrip_position == 'none') { 1115 jQuery(".wds_slideshow_image_" + wds).css('border-radius', jQuery(".wds_slideshow_image_wrap_" + wds).css('border-radius')); 1116 } 1117 else { 1118 jQuery(".wds_slideshow_image_" + wds).css('border-radius', wds_params[wds].glb_border_radius); 1119 jQuery(".wds_slideshow_filmstrip_container_" + wds).css('border-radius', wds_params[wds].glb_border_radius); 1120 if (filmstrip_position == 'top') { 1121 jQuery(".wds_slideshow_image_" + wds).css('border-top-left-radius', 0); 1122 jQuery(".wds_slideshow_image_" + wds).css('border-top-right-radius', 0); 1123 jQuery(".wds_slideshow_filmstrip_container_" + wds).css('border-bottom-left-radius', 0); 1124 jQuery(".wds_slideshow_filmstrip_container_" + wds).css('border-bottom-right-radius', 0); 1125 } 1126 else if (filmstrip_position == 'bottom') { 1127 jQuery(".wds_slideshow_image_" + wds).css('border-bottom-left-radius', 0); 1128 jQuery(".wds_slideshow_image_" + wds).css('border-bottom-right-radius', 0); 1129 jQuery(".wds_slideshow_filmstrip_container_" + wds).css('border-top-left-radius', 0); 1130 jQuery(".wds_slideshow_filmstrip_container_" + wds).css('border-top-right-radius', 0); 1131 } 1132 else if (filmstrip_position == 'right') { 1133 jQuery(".wds_slideshow_image_" + wds).css('border-bottom-right-radius', 0); 1134 jQuery(".wds_slideshow_image_" + wds).css('border-top-right-radius', 0); 1135 jQuery(".wds_slideshow_filmstrip_container_" + wds).css('border-bottom-left-radius', 0); 1136 jQuery(".wds_slideshow_filmstrip_container_" + wds).css('border-top-left-radius', 0); 1137 } 1138 else if (filmstrip_position == 'left') { 1139 jQuery(".wds_slideshow_image_" + wds).css('border-bottom-left-radius', 0); 1140 jQuery(".wds_slideshow_image_" + wds).css('border-top-left-radius', 0); 1141 jQuery(".wds_slideshow_filmstrip_container_" + wds).css('border-bottom-right-radius', 0); 1142 jQuery(".wds_slideshow_filmstrip_container_" + wds).css('border-top-right-radius', 0); 1143 } 1144 } 1145 jQuery(".wds_slide_bg_" + wds).css('perspective', 1000); 1146 jQuery(current_image_class).css({ 1147 transform: 'translateZ(' + tz + 'px)', 1148 backfaceVisibility: 'hidden' 1149 }); 1150 jQuery(next_image_class).css({ 1151 opacity: 1, 1152 filter: 'Alpha(opacity=100)', 1153 zIndex: 2, 1154 backfaceVisibility: 'hidden', 1155 transform: 'translateY(' + nty + 'px) translateX(' + ntx + 'px) rotateY(' + nry + 'deg) rotateX(' + nrx + 'deg)' 1156 }); 1157 jQuery(".wds_slider_" + wds).css({ 1158 transform: 'translateZ(-' + tz + 'px)', 1159 transformStyle: 'preserve-3d', 1160 position: 'absolute' 1161 }); 1162 /* Execution steps.*/ 1163 setTimeout(function () { 1164 jQuery(".wds_slider_" + wds).css({ 1165 transition: 'all ' + wds_params[wds].wds_transition_duration + 'ms ' + easing, 1166 transform: 'translateZ(-' + tz + 'px) rotateX(' + wrx + 'deg) rotateY(' + wry + 'deg)' 1167 }); 1168 }, 20); 1169 /* After transition.*/ 1170 jQuery(".wds_slider_" + wds).one('webkitTransitionEnd transitionend otransitionend oTransitionEnd mstransitionend', jQuery.proxy(wds_after_trans)); 1171 1172 function wds_after_trans() { 1173 jQuery(current_image_class).removeAttr('style'); 1174 jQuery(next_image_class).removeAttr('style'); 1175 jQuery(".wds_slider_" + wds).removeAttr('style'); 1176 jQuery(current_image_class).css({'opacity': 0, filter: 'Alpha(opacity=0)', 'z-index': 1}); 1177 jQuery(next_image_class).css({'opacity': 1, filter: 'Alpha(opacity=100)', 'z-index': 2}); 1178 wds_params[wds].wds_trans_in_progress = false;
1179 if (typeof wds_params[wds].wds_event_stack !== 'undefined') { 1180 if (wds_params[wds].wds_event_stack.length > 0) { 1181 key = wds_params[wds].wds_event_stack[0].split("-"); 1182 wds_params[wds].wds_event_stack.shift(); 1183 wds_change_image(wds, key[0], key[1], wds_params[wds].wds_data, true, direction); 1184 } 1185 } 1186 jQuery(".wds_slide_container_" + wds).css('overflow', 'hidden'); 1187 jQuery(".wds_slideshow_image_spun2_" + wds).css('overflow', 'hidden'); 1188 jQuery(".wds_slideshow_image_wrap_" + wds).css('overflow', 'hidden'); 1189 jQuery(".wds_slide_bg_" + wds).css('perspective', 'none'); 1190 jQuery.each( wds_params[wds].callback_items, function( index, value ) { 1191 if ( index === 'onSliderCE' && value !== '' ) { 1192 var wds_callback_f = new Function( wds_params[wds].callback_items.onSliderCE ); 1193 wds_callback_f(); 1194 } 1195 }); 1196 } 1197} 1198 1199function wds_cubeR(wds, current_image_class, next_image_class, direction) { 1200 var random_direction = Math.floor(Math.random() * 2); 1201 var dimension = random_direction ? jQuery(current_image_class).height() / 2 : jQuery(current_image_class).width() / 2; 1202 if (direction == 'right') { 1203 if (random_direction) { 1204 wds_cube(wds, dimension, 0, -dimension, 90, 0, -90, 0, current_image_class, next_image_class, direction, 'cubic-bezier(0.785, 0.135, 0.150, 0.860)'); 1205 } 1206 else { 1207 wds_cube(wds, dimension, dimension, 0, 0, 90, 0, -90, current_image_class, next_image_class, direction, 'cubic-bezier(0.785, 0.135, 0.150, 0.860)'); 1208 } 1209 } 1210 else if (direction == 'left') { 1211 if (random_direction) { 1212 wds_cube(wds, dimension, 0, dimension, -90, 0, 90, 0, current_image_class, next_image_class, direction, 'cubic-bezier(0.785, 0.135, 0.150, 0.860)'); 1213 } 1214 else { 1215 wds_cube(wds, dimension, -dimension, 0, 0, -90, 0, 90, current_image_class, next_image_class, direction, 'cubic-bezier(0.785, 0.135, 0.150, 0.860)'); 1216 } 1217 } 1218} 1219 1220function wds_sliceH(wds, current_image_class, next_image_class, direction) { 1221 if (direction == 'right') { 1222 var translateX = 'min-auto'; 1223 } 1224 else if (direction == 'left') { 1225 var translateX = 'auto'; 1226 } 1227 wds_grid(wds, 1, 8, 0, translateX, 0, 1, 0, current_image_class, next_image_class, direction, 0, 0, 'ease-in-out'); 1228} 1229 1230function wds_slideV(wds, current_image_class, next_image_class, direction) { 1231 if (direction == 'right') { 1232 var translateY = 'auto'; 1233 } 1234 else if (direction == 'left') { 1235 var translateY = 'min-auto'; 1236 } 1237 wds_grid(wds, 1, 1, 0, 0, translateY, 1, 1, current_image_class, next_image_class, direction, 0, 0, 'cubic-bezier(0.785, 0.135, 0.150, 0.860)'); 1238} 1239 1240function wds_slideH(wds, current_image_class, next_image_class, direction) { 1241 if (direction == 'right') { 1242 var translateX = 'min-auto'; 1243 } 1244 else if (direction == 'left') { 1245 var translateX = 'auto'; 1246 } 1247 wds_grid(wds, 1, 1, 0, translateX, 0, 1, 1, current_image_class, next_image_class, direction, 0, 0, 'cubic-bezier(0.785, 0.135, 0.150, 0.860)'); 1248} 1249 1250function wds_scaleOut(wds, current_image_class, next_image_class, direction) { 1251 wds_grid(wds, 1, 1, 0, 0, 0, 1.5, 0, current_image_class, next_image_class, direction, 0, 0, 'ease-in-out'); 1252} 1253 1254function wds_scaleIn(wds, current_image_class, next_image_class, direction) { 1255 wds_grid(wds, 1, 1, 0, 0, 0, 0.5, 0, current_image_class, next_image_class, direction, 0, 0, 'ease-in-out'); 1256} 1257 1258function wds_blockScale(wds, current_image_class, next_image_class, direction) { 1259 wds_grid(wds, 8, 6, 0, 0, 0, 0.6, 0, current_image_class, next_image_class, direction, 0, 0, 'ease-in-out'); 1260} 1261 1262function wds_kaleidoscope(wds, current_image_class, next_image_class, direction) { 1263 wds_grid(wds, 10, 8, 0, 0, 0, 1, 0, current_image_class, next_image_class, direction, 0, 0, 'ease-in-out'); 1264} 1265 1266function wds_fan(wds, current_image_class, next_image_class, direction) { 1267 if (direction == 'right') { 1268 var rotate = 45; 1269 var translateX = 100; 1270 } 1271 else if (direction == 'left') { 1272 var rotate = -45; 1273 var translateX = -100; 1274 } 1275 wds_grid(wds, 1, 10, rotate, translateX, 0, 1, 0, current_image_class, next_image_class, direction, 0, 0, 'ease-in-out'); 1276} 1277 1278function wds_blindV(wds, current_image_class, next_image_class, direction) { 1279 wds_grid(wds, 1, 8, 0, 0, 0, .7, 0, current_image_class, next_image_class, direction, 0, 0, 'ease-in-out'); 1280} 1281 1282function wds_blindH(wds, current_image_class, next_image_class, direction) { 1283 wds_grid(wds, 10, 1, 0, 0, 0, .7, 0, current_image_class, next_image_class, direction, 0, 0, 'ease-in-out'); 1284} 1285 1286function wds_random(wds, current_image_class, next_image_class, direction) { 1287 var anims = ['sliceH', 'sliceV', 'slideH', 'slideV', 'scaleOut', 'scaleIn', 'blockScale', 'kaleidoscope', 'fan', 'blindH', 'blindV', 'parallelSlideH', 'parallelSlideV']; 1288 /* Pick a random transition from the anims array.*/ 1289 window["wds_" + anims[Math.floor(Math.random() * anims.length)]](wds, current_image_class, next_image_class, direction); 1290} 1291 1292function wds_3Drandom(wds, current_image_class, next_image_class, direction) { 1293 var wds = wds_params[wds].wds; 1294 var anims = ['cubeH', 'cubeV', 'cubeR', 'slic3DH', 'slic3DV', 'slicR3DH', 'slicR3DV']; 1295 /* Pick a random transition from the anims array.*/ 1296 window["wds_" + anims[Math.floor(Math.random() * anims.length)]](wds, current_image_class, next_image_class, direction); 1297} 1298 1299function wds_grid3d(wds, cols, rows, tz, wrx, wry, nty, ntx, nry, nrx, current_image_class, next_image_class, direction, random, easing) { 1300 /* If browser does not support CSS transitions.*/ 1301 if (!wds_testBrowser_cssTransitions()) { 1302 return wds_fallback(wds, current_image_class, next_image_class, direction); 1303 } 1304 wds_params[wds].wds_trans_in_progress = true; 1305 /* Set active thumbnail.*/ 1306 wds_set_filmstrip_class(wds); 1307 wds_set_dots_class(wds); 1308 /* The time (in ms) added to/subtracted from the delay total for each new gridlet.*/ 1309 var count = (wds_params[wds].wds_transition_duration) / (cols + rows); 1310 1311 /* Gridlet creator (divisions of the image grid, positioned with background-images to replicate the look of an entire slide image when assembled)*/ 1312 function wds_gridlet(width, height, top, img_top, left, img_left, src, src2, imgWidth, imgHeight, c, r) {
1313 var delay = random ? Math.floor((cols + rows) * count * Math.random()) : (c + r) * count; 1314 /* Return a gridlet elem with styles for specific transition.*/ 1315 var grid_div = jQuery('<span class="wds_gridlet_' + wds + '" />').css({ 1316 display: "block", 1317 width: "100%", 1318 height: "100%", 1319 transform: 'translateZ(' + tz + 'px)', 1320 backfaceVisibility: 'hidden', 1321 overflow: 'hidden' 1322 }).append(jQuery('<span class="wds_gridlet_' + wds + '" />').css({ 1323 display: "block", 1324 width: jQuery(".wds_slideshow_image_spun_" + wds).width() + "px", 1325 height: jQuery(".wds_slideshow_image_spun_" + wds).height() + "px", 1326 top: -top, 1327 left: -left, 1328 backgroundImage: src, 1329 backgroundSize: jQuery(".wds_slideshow_image_" + wds).css("background-size"), 1330 backgroundPosition: jQuery(".wds_slideshow_image_" + wds).css("background-position"), 1331 backgroundRepeat: 'no-repeat', 1332 })); 1333 var grid_div2 = jQuery('<span class="wds_gridlet_' + wds + '" />').css({ 1334 display: "block", 1335 width: "100%", 1336 height: "100%", 1337 backfaceVisibility: 'hidden', 1338 transform: 'translateY(' + nty + 'px) translateX(' + ntx + 'px) rotateY(' + nry + 'deg) rotateX(' + nrx + 'deg)', 1339 overflow: 'hidden' 1340 }).append(jQuery('<span class="wds_gridlet_' + wds + '" />').css({ 1341 display: "block", 1342 width: jQuery(".wds_slideshow_image_spun_" + wds).width() + "px", 1343 height: jQuery(".wds_slideshow_image_spun_" + wds).height() + "px", 1344 top: -top, 1345 left: -left, 1346 backgroundImage: src2, 1347 backgroundSize: jQuery(".wds_slideshow_image_" + wds).css("background-size"), 1348 backgroundPosition: jQuery(".wds_slideshow_image_" + wds).css("background-position"), 1349 backgroundRepeat: 'no-repeat', 1350 })); 1351 return jQuery('<span class="wds_gridlet_' + wds + '" />').css({ 1352 display: "block", 1353 width: width, 1354 height: height, 1355 top: top, 1356 left: left, 1357 transition: 'all ' + wds_params[wds].wds_transition_duration + 'ms ' + easing + ' ' + delay + 'ms', 1358 transform: 'translateZ(-' + tz + 'px)', 1359 transformStyle: 'preserve-3d', 1360 }).append(grid_div).append(grid_div2); 1361 } 1362 1363 /* Get the current slide's image.*/ 1364 var cur_img = jQuery(current_image_class).find('span[data-img-id^="wds_slideshow_image"]'); 1365 var next_img = jQuery(next_image_class).find('span[data-img-id^="wds_slideshow_image"]'); 1366 /* Create a grid to hold the gridlets.*/ 1367 var grid = jQuery('<span style="display: block;" />').addClass('wds_grid_' + wds).css('perspective', 1000); 1368 /* Prepend the grid to the next slide (i.e. so it's above the slide image).*/ 1369 jQuery(current_image_class).prepend(grid); 1370 /* vars to calculate positioning/size of gridlets*/ 1371 var cont = jQuery(".wds_slide_bg_" + wds); 1372 var imgWidth = cur_img.width(); 1373 var imgHeight = cur_img.height(); 1374 var contWidth = cont.width(), 1375 contHeight = cont.height(), 1376 imgSrc = cur_img.css('background-image'), 1377 imgSrcNext = next_img.css('background-image'),
1378 colWidth = Math.floor(contWidth / cols), 1379 rowHeight = Math.floor(contHeight / rows), 1380 colRemainder = contWidth - (cols * colWidth), 1381 colAdd = Math.ceil(colRemainder / cols), 1382 rowRemainder = contHeight - (rows * rowHeight), 1383 rowAdd = Math.ceil(rowRemainder / rows), 1384 leftDist = 0, 1385 img_leftDist = (jQuery(".wds_slide_bg_" + wds).width() - cur_img.width()) / 2; 1386 /* Loop through cols*/ 1387 for (var i = 0; i < cols; i++) { 1388 var topDist = 0, 1389 img_topDst = (jQuery(".wds_slide_bg_" + wds).height() - cur_img.height()) / 2, 1390 newColWidth = colWidth; 1391 /* If imgWidth (px) does not divide cleanly into the specified number of cols, adjust individual col widths to create correct total.*/ 1392 if (colRemainder > 0) { 1393 var add = colRemainder >= colAdd ? colAdd : colRemainder; 1394 newColWidth += add; 1395 colRemainder -= add; 1396 } 1397 /* Nested loop to create row gridlets for each col.*/ 1398 for (var j = 0; j < rows; j++) { 1399 var newRowHeight = rowHeight, 1400 newRowRemainder = rowRemainder; 1401 /* If contHeight (px) does not divide cleanly into the specified number of rows, adju
1401st individual row heights to create correct total.*/ 1402 if (newRowRemainder > 0) { 1403 add = newRowRemainder >= rowAdd ? rowAdd : rowRemainder; 1404 newRowHeight += add; 1405 newRowRemainder -= add; 1406 } 1407 /* Create & append gridlet to grid.*/ 1408 grid.append(wds_gridlet(newColWidth, newRowHeight, topDist, img_topDst, leftDist, img_leftDist, imgSrc, imgSrcNext, imgWidth, imgHeight, i, j)); 1409 topDist += newRowHeight; 1410 img_topDst -= newRowHeight; 1411 } 1412 img_leftDist -= newColWidth; 1413 leftDist += newColWidth; 1414 } 1415 /* Show grid & hide the image it replaces.*/ 1416 grid.show(); 1417 cur_img.css('opacity', 0); 1418 /* Execution steps.*/ 1419 setTimeout(function () { 1420 grid.children().css({ 1421 transform: 'translateZ(-' + tz + 'px) rotateX(' + wrx + 'deg) rotateY(' + wry + 'deg)' 1422 }); 1423 }, 1); 1424 /* After transition.*/ 1425 var cccount = 0; 1426 var obshicccount = cols * rows; 1427 grid.children().one('webkitTransitionEnd transitionend otransitionend oTransitionEnd mstransitionend', jQuery.proxy(wds_after_trans_each)); 1428 1429 function wds_after_trans_each(wds) { 1430 if (++cccount == obshicccount) { 1431 wds_after_trans(wds); 1432 } 1433 } 1434 1435 function wds_after_trans() { 1436 jQuery(current_image_class).css({'opacity': 0, 'z-index': 1}); 1437 jQuery(next_image_class).css({'opacity': 1, 'z-index': 2}); 1438 cur_img.css('opacity', 1); 1439 grid.remove(); 1440 wds_params[wds].wds_trans_in_progress = false; 1441 if (typeof wds_params[wds].wds_event_stack !== 'undefined') { 1442 if (wds_params[wds].wds_event_stack.length > 0) { 1443 key = wds_params[wds].wds_event_stack[0].split("-"); 1444 wds_params[wds].wds_event_stack.shift(); 1445 wds_change_image(wds, key[0], key[1], wds_params[wds].wds_data, true, direction); 1446 } 1447 } 1448 jQuery.each( wds_params[wds].callback_items, function( index, value ) { 1449 if ( index === 'onSliderCE' && value !== '' ) { 1450 var wds_callback_f = new Function( wds_params[wds].callback_items.onSliderCE ); 1451 wds_callback_f(); 1452 } 1453 }); 1454 } 1455} 1456 1457function wds_window_fixed_size(wds, id) { 1458 1459 if (wds_params[wds].fixed_bg != 1 || wds_params[wds].wds_data[parseInt(j
1459Query('#wds_current_image_key_' + wds).val())]["is_video"] != 'image') { 1460 return; 1461 } 1462 var image = new Image(); 1463 image.src = jQuery(id + " .wds_slideshow_image_" + wds).css('background-image').replace(/url\(|\)$|"/ig, ''); 1464 var slide_bg_width = image.width; 1465 var slide_bg_height = image.height; 1466 if (typeof image.remove != 'undefined') { 1467 image.remove(); 1468 } 1469 var window_height = jQuery(window).height(); 1470 var window_width = jQuery(window).width(); 1471 var width, height; 1472 var scale = Math.max(window_width / slide_bg_width, window_height / slide_bg_height); 1473 width = slide_bg_width * scale; 1474 height = slide_bg_height * scale; 1475 /* TOOD remove this 1476 if ('<?php echo $slider->bg_fit; ?>' == 'cover' || '<?php echo $slider->bg_fit; ?>' == 'contain') { 1477 var scale = Math.max(window_width / slide_bg_width, window_height / slide_bg_height); 1478 width = slide_bg_width * scale; 1479 height = slide_bg_height * scale; 1480 } 1481 else { 1482 width = window_width; 1483 height = window_height; 1484 } 1485 */ 1486 jQuery(id + " .wds_slideshow_image_"+wds).css({"background-size": width + "px " + height + "px"}); 1487 wds_window_fixed_pos(wds, id); 1488} 1489 1490function wds_window_fixed_pos(wds, id) { 1491 var cont = (typeof id == "undefined") ? "" : id + " "; 1492 var offset = jQuery(cont + ".wds_slideshow_image_" + wds).offset().top; 1493 var scrtop = jQuery(document).scrollTop(); 1494 var sliderheight = jQuery(cont + ".wds_slideshow_image_" + wds).height(); 1495 var window_height = jQuery(window).height(); 1496 var fixed_pos; 1497 if (wds_params[wds].smart_crop == '1') { 1498 if (wds_params[wds].crop_image_position == 'right bottom' 1499 || wds_params[wds].crop_image_position == 'center bottom' 1500 || wds_params[wds].crop_image_position == 'left bottom') { 1501 pos_retion_height = "100%"; 1502 } 1503 else if (wds_params[wds].crop_image_position == 'left center' 1504 || wds_params[wds].crop_image_position == 'center center' 1505 || wds_params[wds].crop_image_position == 'right center') { 1506 pos_retion_height = "50%"; 1507 } 1508 else if (wds_params[wds].crop_image_position == 'left top' 1509 || wds_params[wds].crop_image_position == 'center top' 1510 || wds_params[wds].crop_image_position == 'right top') { 1511 pos_retion_height = "0%"; 1512 } 1513 } 1514 fixed_pos = offset - scrtop - window_height / 2 + sliderheight / 2; 1515 jQuery(cont + ".wds_slideshow_image_" + wds).css({"background-position": "50% " + "calc(50% - " + fixed_pos + "px)"}); 1516 if (scrtop < offset + sliderheight) { 1517 if (wds_params[wds].smart_crop == '1') { 1518 jQuery(cont + ".wds_slideshow_image_" + wds).css({"background-position": "" + pos_retion_height + " " + "calc(50% - " + fixed_pos + "px)"}); 1519 } 1520 } 1521} 1522 1523/* Effects out part.*/ 1524function wds_set_layer_effect_out_wds(wds, i, key) { 1525 var cout; 1526 wds_params[wds].wds_clear_layers_effects_out[key][i] = setTimeout(function () { 1527 cout = jQuery('#wds_' + wds + '_slide' + wds_params[wds].wds_data[key]["id"] + '_layer' + wds_params[wds].wds_data[key]["layer_" + i + "_id"]); 1528 if (wds_params[wds].wds_data[key]["layer_" + i + "_layer_effect_out"] != 'none') { 1529 if (wds_params[wds].wds_data[key]["layer_" + i + "_type"] != 'social') {
1530 if (jQuery('#wds_' + wds + '_slide' + wds_params[wds].wds_data[key]["id"] + '_layer' + wds_params[wds].wds_data[key]["layer_" + i + "_id"]).prev().attr('id') != 'wds_' + wds + '_slide' + wds_params[wds].wds_data[key]["id"] + '_layer' + wds_params[wds].wds_data[key]["layer_" + i + "_id"] + '_round_effect') { 1531 cout.css('-webkit-animation-duration', wds_params[wds].wds_data[key]["layer_" + i + "_duration_eff_out"] / 1000 + 's').css('animation-duration', wds_params[wds].wds_data[key]["layer_" + i + "_duration_eff_out"] / 1000 + 's'); 1532 cout.removeClass().addClass(wds_params[wds].wds_data[key]["layer_" + i + "_layer_effect_out"] + ' wds_animated'); 1533 } 1534 else { 1535 cout = jQuery('#wds_' + wds + '_slide' + wds_params[wds].wds_data[key]["id"] + '_layer' + wds_params[wds].wds_data[key]["layer_" + i + "_id"] + '_div'); 1536 cout.css('-webkit-animation-duration', wds_params[wds].wds_data[key]["layer_" + i + "_duration_eff_out"] / 1000 + 's').css('animation-duration', wds_params[wds].wds_data[key]["layer_" + i + "_duration_eff_out"] / 1000 + 's'); 1537 cout.removeClass().addClass(wds_params[wds].wds_data[key]["layer_" + i + "_layer_effect_out"] + ' wds_animated'); 1538 } 1539 1540 setTimeout(function () { 1541 if(wds_params[wds].wds_data[key]["layer_" + i + "_type"] == 'upvideo') { 1542 var curr_iframe = jQuery('#wds_' + wds + '_slide' + wds_params[wds].wds_data[key]["id"] + '_layer' + wds_params[wds].wds_data[key]["layer_" + i + "_id"]+" video"); 1543 jQuery("#wds_slideshow_image_container_" + wds).find("video").each(function () { 1544 if(jQuery(this).attr('id') == curr_iframe.attr('id')) { 1545 jQuery(this).trigger('pause'); 1546 jQuery('.wds_bigplay_' + wds).show(); 1547 } 1548 }); 1549 } 1550 1551 if(wds_params[wds].wds_data[key]["layer_" + i + "_type"] == 'video') { 1552 var curr_iframe = jQuery('#wds_' + wds + '_slide' + wds_params[wds].wds_data[key]["id"] + '_layer' + wds_params[wds].wds_data[key]["layer_" + i + "_id"]+" .wds_video_layer_frame_" + wds); 1553 /* Pause layer videos. */ 1554 jQuery(".wds_video_layer_frame_" + wds).each(function () { 1555 if(jQuery(this).attr('id') == curr_iframe.attr('id')) { 1556 if (typeof jQuery(this)[0].contentWindow != "undefined") { 1557 if (jQuery(this).data('type') == 'youtube') { 1558 player = wds_params[wds].youtube_iframes_ids.indexOf(this.id); 1559 1560 if (typeof wds_params[wds].youtube_iframes[player] != "undefined" && wds_done) { 1561 wds_params[wds].youtube_iframes[player].stopVideo(); 1562 } 1563 } 1564 else if (jQuery(this).data('type') == 'vimeo') { 1565 jQuery(this)[0].contentWindow.postMessage('{ "method": "pause" }', "*"); 1566 } 1567 else { 1568 jQuery(this)[0].contentWindow.postMessage('stop', '*'); 1569 } 1570 } 1571 } 1572 }); 1573 } 1574 },wds_params[wds].wds_data[key]["layer_" + i + "_duration_eff_out"]); 1575 } 1576 else { 1577 cout.css('-webkit-animation-duration', wds_params[wds].wds_data[key]["layer_" + i + "_duration_eff_out"] / 1000 + 's').css('animation-duration', wds_params[wds].wds_data[key]["layer_" + i + "_duration_eff_out"] / 1000 + 's'); 1578 cout.removeClass().addClass(wds_params[wds].wds_data[key]["layer_" + i + "_layer_effect_out"] + ' fa fa-' + wds_params[wds].wds_data[key]["layer_" + i + "_social_button"] + ' wds_animated'); 1579 } 1580 var iteration_count = wds_params[wds].wds_data[key]["layer_" + i + "_infinite_out"] == 0 ? 'infinite' : wds_params[wds].wds_data[key]["layer_" + i + "_infinite_out"]; 1581 cout.css( 1582 '-webkit-animation-iteration-count', iteration_count 1583 ).css( 1584 'animation-iteration-count', iteration_count 1585 ); 1586 } 1587 }, wds_params[wds].wds_data[key]["layer_" + i + "_end"]); 1588} 1589 1590/* Effects in part.*/ 1591function wds_set_layer_effect_in_wds(wds, j, key) { 1592 var cout; 1593 wds_params[wds].wds_clear_layers_effects_in[key][j] = setTimeout(function () {
1594 cout = jQuery('#wds_' + wds + '_slide' + wds_params[wds].wds_data[key]["id"] + '_layer' + wds_params[wds].wds_data[key]["layer_" + j + "_id"]); 1595 if (wds_params[wds].wds_data[key]["layer_" + j + "_type"] != 'social') { 1596 if (cout.prev().attr('id') != 'wds_' + wds + '_slide' + wds_params[wds].wds_data[key]["id"] + '_layer' + wds_params[wds].wds_data[key]["layer_" + j + "_id"] + '_round_effect') { 1597 cout.css('-webkit-animation-duration', wds_params[wds].wds_data[key]["layer_" + j + "_duration_eff_in"] / 1000 + 's').css('animation-duration', wds_params[wds].wds_data[key]["layer_" + j + "_duration_eff_in"] / 1000 + 's'); 1598 cout.attr("class", ""); 1599 cout.addClass(wds_params[wds].wds_data[key]["layer_" + j + "_layer_effect_in"] + ' wds_animated'); 1600 cout.addClass(jQuery('#wds_' + wds + '_slide' + wds_params[wds].wds_data[key]["id"] + '_layer' + wds_params[wds].wds_data[key]["layer_" + j + "_id"]).data("class")); 1601 } 1602 else { 1603 cout = jQuery('#wds_' + wds + '_slide' + wds_params[wds].wds_data[key]["id"] + '_layer' + wds_params[wds].wds_data[key]["layer_" + j + "_id"] + '_div'); 1604 cout.css('-webkit-animation-duration', wds_params[wds].wds_data[key]["layer_" + j + "_duration_eff_in"] / 1000 + 's').css('animation-duration', wds_params[wds].wds_data[key]["layer_" + j + "_duration_eff_in"] / 1000 + 's'); 1605 cout.removeClass().addClass('hotspot_container ' + wds_params[wds].wds_data[key]["layer_" + j + "_layer_effect_in"] + ' wds_animated'); 1606 } 1607 } 1608 else { 1609 cout.css('-webkit-animation-duration', wds_params[wds].wds_data[key]["layer_" + j + "_duration_eff_in"] / 1000 + 's').css('animation-duration', wds_params[wds].wds_data[key]["layer_" + j + "_duration_eff_in"] / 1000 + 's'); 1610 cout.removeClass().addClass(wds_params[wds].wds_data[key]["layer_" + j + "_layer_effect_in"] + ' fa fa-' + wds_params[wds].wds_data[key]["layer_" + j + "_social_button"] + ' wds_animated'); 1611 } 1612 /* Play video on layer in.*/ 1613 1614 if (wds_params[wds].wds_data[key]["layer_" + j + "_type"] == "video") { 1615 if (wds_params[wds].wds_data[key]["layer_" + j + "_video_autoplay"] == "on") { 1616 cout.find("iframe").each(function () { 1617 if (jQuery(this).data('type') == 'youtube') { 1618 player = wds_params[wds].youtube_iframes_ids.indexOf(this.id); 1619 if (typeof wds_params[wds].youtube_iframes[player] != "undefined") { 1620 wds_playVideo(wds_params[wds].youtube_iframes[player]); 1621 } 1622 } 1623 else if (jQuery(this).data('type') == 'vimeo') { 1624 jQuery(this)[0].contentWindow.postMessage('{ "method": "play" }', "*"); 1625 } 1626 else { 1627 jQuery(this)[0].contentWindow.postMessage('play', '*'); 1628 } 1629 }); 1630 } 1631 } 1632 wds_upvideo_layer_dimenstion(wds, key, j); 1633 var iteration_count = wds_params[wds].wds_data[key]["layer_" + j + "_infinite_in"] == 0 ? 'infinite' : wds_params[wds].wds_data[key]["layer_" + j + "_infinite_in"]; 1634 cout.css( 1635 '-webkit-animation-iteration-count', iteration_count 1636 ).css( 1637 'animation-iteration-count', iteration_count 1638 ); 1639 }, wds_params[wds].wds_data[key]["layer_" + j + "_start"]); 1640} 1641 1642function wds_none(wds, current_image_class, next_image_class, direction) { 1643 jQuery(current_image_class).css({'opacity': 0, 'z-index': 1}); 1644 jQuery(next_image_class).css({'opacity': 1, 'z-index': 2}); 1645 /* Set active thumbnail.*/ 1646 wds_set_filmstrip_class(wds); 1647 wds_set_dots_class(wds); 1648} 1649 1650function wds_parallelSlide(wds, ni_left, ni_top, tx, ty, current_image_class, next_image_class, direction, easing) { 1651 /* If browser does not support 3d transforms/CSS transitions.*/ 1652 if (!wds_testBrowser_cssTransitions()) { 1653 return wds_fallback(wds, current_image_class, next_image_class, direction); 1654 } 1655 if (!wds_testBrowser_cssTransforms3d(wds)) { 1656 return wds_fallback3d(wds, current_image_class, next_image_class, direction); 1657 } 1658 wds_params[wds].wds_trans_in_progress = true; 1659 /* Set active thumbnail.*/ 1660 wds_set_filmstrip_class(wds); 1661 wds_set_dots_class(wds); 1662 jQuery(current_image_class).css({ 1663 position: 'absolute', 1664 top: '0px', 1665 left: '0px', 1666 position: 'absolute', 1667 }); 1668 jQuery(next_image_class).css({ 1669 position: 'absolute', 1670 top: ni_top + 'px', 1671 left: ni_left + 'px', 1672 'opacity': 1, 1673 filter: 'Alpha(opacity=100)', 1674 position: 'absolute', 1675 }); 1676 jQuery(".wds_slider_" + wds_params[wds].wds).css({ 1677 position: 'relative', 1678 'backface-visibility': 'hidden' 1679 }); 1680 jQuery(".wds_slide_bg_" + wds_params[wds].wds).css({ 1681 overflow: 'hidden', 1682 }); 1683 /* Execution steps.*/ 1684 setTimeout(function () { 1685 jQuery('.wds_slider_' + wds_params[wds].wds).css({ 1686 transition: 'all ' + wds_params[wds].wds_transition_duration + 'ms ' + easing, 1687 transform: 'translateX(' + tx + 'px) translateY(' + ty + 'px)', 1688 }); 1689 }, 1); 1690 /* After transition.*/ 1691 jQuery('.wds_slider_' + wds_params[wds].wds).one('webkitTransitionEnd transitionend otransitionend oTransitionEnd mstransitionend', jQuery.proxy(wds_after_trans)); 1692 1693 function wds_after_trans() { 1694 jQuery(current_image_class).removeAttr('style'); 1695 jQuery(next_image_class).removeAttr('style'); 1696 jQuery(".wds_slider_" + wds_params[wds].wds).removeAttr('style'); 1697 jQuery(".wds_slide_bg_" + wds_params[wds].wds).removeAttr('style'); 1698 jQuery(current_image_class).css({'opacity': 0, filter: 'Alpha(opacity=0)', 'z-index': 1}); 1699 jQuery(next_image_class).css({'opacity': 1, filter: 'Alpha(opacity=100)', 'z-index': 2}); 1700 wds_params[wds].wds_trans_in_progress = false;
1701 if (typeof wds_params[wds].wds_event_stack !== 'undefined') { 1702 if (wds_params[wds].wds_event_stack.length > 0) { 1703 key = wds_params[wds].wds_event_stack[0].split("-"); 1704 wds_params[wds].wds_event_stack.shift(); 1705 wds_change_image(wds, key[0], key[1], wds_params[wds].wds_data, true, direction); 1706 } 1707 } 1708 jQuery.each( wds_params[wds].callback_items, function( index, value ) { 1709 if ( index === 'onSliderCE' && value !== '' ) { 1710 var wds_callback_f = new Function( wds_params[wds].callback_items.onSliderCE ); 1711 wds_callback_f(); 1712 } 1713 }); 1714 } 1715} 1716 1717function wds_callbackItems(wds, callbackList, slide_id) { 1718 var key = jQuery(".wds_slideshow_image_" + wds + "[data-image-id='" + slide_id + "']").attr('data-image-key'); 1719 switch (callbackList) { 1720 case 'SlidePlay': 1721 wds_play_pause(wds, 'play'); 1722 break; 1723 case 'SlidePause': 1724 wds_play_pause(wds, 'pause'); 1725 break; 1726 case 'SlidePlayPause': 1727 wds_play_pause(wds); 1728 break; 1729 case 'SlideNext':
1730 wds_change_image(wds, parseInt(jQuery('#wds_current_image_key_' + wds).val()), (parseInt(jQuery('#wds_current_image_key_' + wds).val()) + wds_iterator_wds(wds)) % wds_params[wds].wds_data.length, wds_params[wds].wds_data, false, "right"); 1731 if (wds_params[wds].carousel == 1) { 1732 wds_carousel[wds].next(); 1733 } 1734 return false; 1735 break; 1736 case 'SlidePrevious': 1737 wds_change_image(wds, parseInt(jQuery('#wds_current_image_key_' + wds).val()), (parseInt(jQuery('#wds_current_image_key_' + wds).val()) - wds_iterator_wds(wds)) >= 0 ? (parseInt(jQuery('#wds_current_image_key_' + wds_params[wds].wds).val()) - wds_iterator_wds(wds)) % wds_params[wds].wds_data.length : wds_params[wds].wds_data.length - 1, wds_params[wds].wds_data, false, "left"); 1738 if (wds_params[wds].carousel == 1) { 1739 wds_carousel[wds].prev(); 1740 } 1741 return false; 1742 break; 1743 case 'SlideLink': 1744 wds_change_image(wds, parseInt(jQuery('#wds_current_image_key_' + wds).val()), parseInt(key), wds_params[wds].wds_data); 1745 if (wds_params[wds].carousel == 1) { 1746 wds_carousel[wds].shift(jQuery('.wds_slider_car_image' + wds + '[data-image-id=' + slide_id + ']')); 1747 } 1748 return false; 1749 break; 1750 case 'PlayMusic': 1751 document.getElementById("wds_audio_" + wds).play(); 1752 break; 1753 } 1754} 1755 1756function wds_iterator_wds(wds) { 1757 var iterator = 1; 1758 if (wds_params[wds].enable_slideshow_shuffle) { 1759 iterator = Math.floor((wds_params[wds].wds_data.length - 1) * Math.random() + 1); 1760 } 1761 else if (wds_params[wds].twoway_slideshow) { 1762 if (wds_params[wds].wds_global_btn_wds == "left") { 1763 iterator = -1; 1764 } 1765 if (wds_params[wds].slider_loop == 0) {
1766 if (parseInt(jQuery('#wds_current_image_key_' + wds).val()) == 0) { 1767 iterator = 1; 1768 } 1769 } 1770 } 1771 return iterator; 1772} 1773 1774/* Set filmstrip initial position.*/ 1775function wds_set_filmstrip_pos(wds, filmStripWidth) { 1776 if ( wds_params[wds].width_or_height == 'width' ) { 1777 var selectedImagePos = -(wds_params[wds].wds_current_key * jQuery(".wds_slideshow_filmstrip_thumbnails_"+wds).width() / wds_params[wds].slides_count) - jQuery(".wds_slideshow_filmstrip_thumbnail_"+wds).width() / 2; 1778 var imagesContainerLeft = Math.min(0, Math.max(filmStripWidth - jQuery(".wds_slideshow_filmstrip_thumbnails_"+wds).width(), selectedImagePos + filmStripWidth / 2)); 1779 } else if( wds_params[wds].width_or_height == 'height' ) { 1780 var selectedImagePos = -(wds_params[wds].wds_current_key * jQuery(".wds_slideshow_filmstrip_thumbnails_"+wds).height() / wds_params[wds].slides_count) - jQuery(".wds_slideshow_filmstrip_thumbnail_"+wds).height() / 2; 1781 var imagesContainerLeft = Math.min(0, Math.max(filmStripWidth - jQuery(".wds_slideshow_filmstrip_thumbnails_"+wds).height(), selectedImagePos + filmStripWidth / 2)); 1782 } 1783 if(wds_params[wds].left_or_top == 'top') { 1784 jQuery(".wds_slideshow_filmstrip_thumbnails_" + wds).animate({ 1785 top: imagesContainerLeft 1786 }, { 1787 duration: 500, 1788 complete: function () { 1789 wds_filmstrip_arrows(wds); 1790 } 1791 }); 1792 } else { 1793 jQuery(".wds_slideshow_filmstrip_thumbnails_" + wds).animate({ 1794 left: imagesContainerLeft 1795 }, { 1796 duration: 500, 1797 complete: function () { 1798 wds_filmstrip_arrows(wds); 1799 } 1800 }); 1801 } 1802} 1803 1804function wds_move_filmstrip(wds) { 1805 if ( wds_params[wds].outerWidth_or_outerHeight == 'outerWidth' ) { 1806 var wds_filmstrip_width = jQuery(".wds_slideshow_filmstrip_container_" + wds).outerWidth(true); 1807 var wds_filmstrip_thumbnails_width = jQuery(".wds_slideshow_filmstrip_thumbnails_" + wds).outerWidth(true); 1808 } 1809 else { 1810 var wds_filmstrip_width = jQuery(".wds_slideshow_filmstrip_container_" + wds).outerHeight(true); 1811 var wds_filmstrip_thumbnails_width = jQuery(".wds_slideshow_filmstrip_thumbnails_" + wds).outerHeight(true); 1812 } 1813 if ( wds_params[wds].left_or_top == 'left' ) { 1814 var image_left = jQuery(".wds_slideshow_thumb_active_" + wds).position().left; 1815 var long_filmstrip_cont_left = jQuery(".wds_slideshow_filmstrip_thumbnails_" + wds).position().left; 1816 var long_filmstrip_cont_right = Math.abs(jQuery(".wds_slideshow_filmstrip_thumbnails_" + wds).position().left) + wds_filmstrip_width; 1817 if ( wds_params[wds].outerWidth_or_outerHeight == 'outerWidth' ) { 1818 var image_right = jQuery(".wds_slideshow_thumb_active_" + wds).position().left + jQuery(".wds_slideshow_thumb_active_" + wds).outerWidth(true); 1819 } 1820 else { 1821 var image_right = jQuery(".wds_slideshow_thumb_active_" + wds).position().left + jQuery(".wds_slideshow_thumb_active_" + wds).outerHeight(true); 1822 } 1823 } 1824 if ( wds_params[wds].left_or_top == 'top' ) { 1825 var image_left = jQuery(".wds_slideshow_thumb_active_" + wds).position().top; 1826 var long_filmstrip_cont_left = jQuery(".wds_slideshow_filmstrip_thumbnails_" + wds).position().top; 1827 var long_filmstrip_cont_right = Math.abs(jQuery(".wds_slideshow_filmstrip_thumbnails_" + wds).position().top) + wds_filmstrip_width; 1828 if ( wds_params[wds].outerWidth_or_outerHeight == 'outerWidth' ) { 1829 var image_right = jQuery(".wds_slideshow_thumb_active_" + wds).position().top + jQuery(".wds_slideshow_thumb_active_" + wds).outerWidth(true); 1830 } 1831 else { 1832 var image_right = jQuery(".wds_slideshow_thumb_active_" + wds).position().top + jQuery(".wds_slideshow_thumb_active_" + wds).outerHeight(true); 1833 } 1834 } 1835 if ( wds_filmstrip_width > wds_filmstrip_thumbnails_width ) { 1836 return; 1837 } 1838 var left_or_top = wds_params[wds].left_or_top; 1839 if ( image_left < Math.abs(long_filmstrip_cont_left) ) { 1840 if(left_or_top == 'top') { 1841 jQuery(".wds_slideshow_filmstrip_thumbnails_" + wds).animate({ 1842 top: -image_left 1843 }, { 1844 duration: 500, 1845 complete: function () { 1846 wds_filmstrip_arrows(wds); 1847 } 1848 }); 1849 } else { 1850 jQuery(".wds_slideshow_filmstrip_thumbnails_" + wds).animate({ 1851 left: -image_left 1852 }, { 1853 duration: 500, 1854 complete: function () { 1855 wds_filmstrip_arrows(wds); 1856 } 1857 }); 1858 } 1859 } 1860 else if ( image_right > long_filmstrip_cont_right ) { 1861 if(left_or_top == 'top') { 1862 jQuery(".wds_slideshow_filmstrip_thumbnails_" + wds).animate({ 1863 top: -(image_right - wds_filmstrip_width) 1864 }, { 1865 duration: 500, 1866 complete: function () { 1867 wds_filmstrip_arrows(wds); 1868 } 1869 }); 1870 } 1871 else { 1872 jQuery(".wds_slideshow_filmstrip_thumbnails_" + wds).animate({ 1873 left: -(image_right - wds_filmstrip_width) 1874 }, { 1875 duration: 500, 1876 complete: function () { 1877 wds_filmstrip_arrows(wds); 1878 } 1879 }); 1880 } 1881 } 1882} 1883 1884function wds_move_dots(wds) { 1885 if(typeof jQuery(".wds_slideshow_dots_active_" + wds).position() != "undefined"){ 1886 var image_left = jQuery(".wds_slideshow_dots_active_" + wds).position().left; 1887 var image_right = jQuery(".wds_slideshow_dots_active_" + wds).position().left + jQuery(".wds_slideshow_dots_active_" + wds).outerWidth(true); 1888 } 1889 var wds_dots_width = jQuery(".wds_slideshow_dots_container_" + wds).outerWidth(true); 1890 var wds_dots_thumbnails_width = jQuery(".wds_slideshow_dots_thumbnails_" + wds).outerWidth(true); 1891 if(typeof jQuery(".wds_slideshow_dots_thumbnails_" + wds).position() != "undefined") { 1892 var long_filmstrip_cont_left = jQuery(".wds_slideshow_dots_thumbnails_" + wds).position().left; 1893 var long_filmstrip_cont_right = Math.abs(jQuery(".wds_slideshow_dots_thumbnails_" + wds).position().left) + wds_dots_width; 1894 } 1895 if (!wds_params[wds].carousel) { 1896 if (wds_dots_width > wds_dots_thumbnails_width) { 1897 return; 1898 } 1899 } 1900 if (image_left < Math.abs(long_filmstrip_cont_left)) { 1901 jQuery(".wds_slideshow_dots_thumbnails_" + wds).animate({ 1902 left: -image_left 1903 }, {
1904 duration: 500 1905 }); 1906 } 1907 else if (image_right > long_filmstrip_cont_right) { 1908 jQuery(".wds_slideshow_dots_thumbnails_" + wds).animate({ 1909 left: -(image_right - wds_dots_width) 1910 }, { 1911 duration: 500 1912 }); 1913 } 1914} 1915 1916/* Show/hide filmstrip arrows.*/ 1917function wds_filmstrip_arrows(wds) { 1918 if (wds_params[wds].width_or_height == 'width') { 1919 var cond1 = jQuery(".wds_slideshow_filmstrip_thumbnails_" + wds).width(); 1920 var cond2 = jQuery(".wds_slideshow_filmstrip_" + wds).width(); 1921 } 1922 else if (wds_params[wds].width_or_height == 'height') { 1923 var cond1 = jQuery(".wds_slideshow_filmstrip_thumbnails_" + wds).height(); 1924 var cond2 = jQuery(".wds_slideshow_filmstrip_" + wds).height(); 1925 } 1926 if (cond1 < cond2) { 1927 jQuery(".wds_slideshow_filmstrip_left_" + wds).hide(); 1928 jQuery(".wds_slideshow_filmstrip_right_" + wds).hide(); 1929 } 1930 else { 1931 jQuery(".wds_slideshow_filmstrip_left_" + wds).show(); 1932 jQuery(".wds_slideshow_filmstrip_right_" + wds).show(); 1933 } 1934} 1935 1936function wds_testBrowser_cssTransitions() { 1937 return wds_testDom('Transition'); 1938} 1939 1940function wds_testBrowser_cssTransforms3d() { 1941 return wds_testDom('Perspective'); 1942} 1943 1944function wds_testDom(prop) { 1945 /* Browser vendor DOM prefixes.*/ 1946 var domPrefixes = ['', 'Webkit', 'Moz', 'ms', 'O', 'Khtml']; 1947 var i = domPrefixes.length; 1948 while (i--) { 1949 if (typeof document.body.style[domPrefixes[i] + prop] !== 'undefined') { 1950 return true; 1951 } 1952 } 1953 return false; 1954} 1955 1956function wds_set_dots_class(wds) { 1957 jQuery(".wds_slideshow_dots_" + wds).removeClass("wds_slideshow_dots_active_" + wds).addClass("wds_slideshow_dots_deactive_" + wds); 1958 jQuery("#wds_dots_" + wds_params[wds].wds_current_key + "_" + wds).removeClass("wds_slideshow_dots_deactive_" + wds).addClass("wds_slideshow_dots_active_" + wds); 1959 if (wds_params[wds].bull_butt_img_or_not == 'style') { 1960 jQuery(".wds_slideshow_dots_" + wds).removeClass(wds_params[wds].bull_style_active).addClass(wds_params[wds].bull_style_deactive); 1961 jQuery("#wds_dots_" + wds_params[wds].wds_current_key + "_" + wds).removeClass(wds_params[wds].bull_style_deactive).addClass(wds_params[wds].bull_style_active); 1962 } 1963} 1964 1965function wds_set_filmstrip_class(wds) { 1966 jQuery('.wds_slideshow_filmstrip_thumbnail_' + wds).removeClass('wds_slideshow_thumb_active_' + wds).addClass('wds_slideshow_thumb_deactive_' + wds); 1967 jQuery('#wds_filmstrip_thumbnail_' + wds_params[wds].wds_current_key + '_' + wds).removeClass('wds_slideshow_thumb_deactive_' + wds).addClass('wds_slideshow_thumb_active_' + wds); 1968} 1969 1970var wds_done = false; 1971var wds_ready = false; 1972 1973function wds_resize_instagram_post( wds ) { 1974 if (jQuery('.inner_instagram_iframe_wds_video_frame_'+wds).length) { 1975 var post_width = jQuery('.wds_slideshow_video_'+wds).width(); 1976 var post_height = jQuery('.wds_slideshow_video_'+wds).height(); 1977 var parent_height = post_height; 1978 jQuery('.inner_instagram_iframe_wds_video_frame_'+wds).each(function() { 1979 var parent_container = jQuery(this).parent(); 1980 if (post_height < post_width + 88) { 1981 post_width = post_height - 88; 1982 } 1983 else { 1984 post_height = post_width + 88; 1985 } 1986 parent_container.height(post_height); 1987 parent_container.width(post_width); 1988 parent_container.css({top: 0.5 * (parent_height - post_height)}); 1989 }); 1990 } 1991} 1992 1993function wds_resize_slider( wds ) { 1994 if( jQuery(window).width() < parseInt(wds_params[wds].full_width_for_mobile) || 1995 (wds_params[wds].full_width == '1') ){ 1996 var full_width = '1'; 1997 } else { 1998 var full_width = wds_params[wds].full_width; 1999 } 2000 wds_params[wds].wds_glb_margin = parseInt(wds_params[wds].glb_margin); 2001 if (wds_params[wds].bull_butt_img_or_not == 'text') { 2002 wds_set_text_dots_cont( wds ); 2003 } 2004 var slide_orig_width = wds_params[wds].image_width + (wds_params[wds].filmstrip_direction == 'horizontal' ? 0 : wds_params[wds].filmstrip_width); 2005 var slide_orig_height = wds_params[wds].image_height + (wds_params[wds].filmstrip_direction == 'horizontal' ? wds_params[wds].filmstrip_height : 0); 2006 var slide_width = wds_get_overall_parent(jQuery("#wds_container1_"+wds)); 2007 var ratio; 2008 if (wds_params[wds].carousel != 1) { 2009 if (slide_width > slide_orig_width) { 2010 slide_width = slide_orig_width; 2011 } 2012 ratio = slide_width / (slide_orig_width + 2 * wds_params[wds].wds_glb_margin); 2013 } 2014 if (full_width == '1') { 2015 ratio = jQuery(window).width() / slide_orig_width; 2016 slide_orig_width = jQuery(window).width(); 2017 if (wds_params[wds].auto_height) { 2018 slide_orig_height = jQuery(window).height(); 2019 } 2020 else { 2021 /* slide_orig_height = wds_params[wds].image_height + wds_params[wds].filmstrip_he
2021ight * slide_orig_width / wds_params[wds].image_width; */ 2022 slide_orig_height = (wds_params[wds].filmstrip_height + wds_params[wds].image_height) * ratio; 2023 } 2024 slide_width = jQuery(window).width(); 2025 wds_full_width( wds ); 2026 } 2027 else if ( full_width == "2" ) { 2028 if ( wds_params[wds].carousel != 1 ) { 2029 slide_orig_width = wds_get_overall_parent(jQuery("#wds_container1_" + wds)); 2030 ratio = slide_orig_width / wds_params[wds].image_width; 2031 /* slide_orig_height = wds_params[wds].image_height + wds_params[wds].filmstrip_height * slide_orig_width / wds_params[wds].image_width; */ 2032 slide_orig_height = (wds_params[wds].filmstrip_height + wds_params[wds].image_height) * ratio - (2 * wds_params[wds].wds_glb_margin); 2033 } 2034 } 2035 else if ( parseInt(wds_params[wds].full_width_for_mobile) ) { 2036 jQuery(".wds_slideshow_image_wrap_"+wds).removeAttr("style"); 2037 } 2038 if ( wds_params[wds].carousel == 1) { 2039 ratio = 1; 2040 if ( slide_width < wds_params[wds].carousel_width ) { 2041 ratio = slide_width / wds_params[wds].carousel_width; 2042 } 2043 } 2044 wds_params[wds].wds_glb_margin = parseInt(wds_params[wds].glb_margin); 2045 wds_params[wds].wds_glb_margin *= ratio; 2046 if (full_width == '0') { 2047 slide_orig_height -= wds_params[wds].wds_glb_margin; 2048 } 2049 jQuery("#wds_container2_"+wds).css("margin", wds_params[wds].wds_glb_margin + "px " + (full_width=='1' ? 0 : '') + ""); 2050 var slide_height = slide_orig_height; 2051 2052 if (slide_orig_width > slide_width && full_width != '2') { 2053 slide_height = Math.floor(slide_width * slide_orig_height / slide_orig_width); 2054 } 2055 jQuery(".wds_slideshow_image_wrap_"+wds+", #wds_container2_"+wds).height(slide_height); 2056 jQuery(".wds_slideshow_image_"+wds+" img").each(function () { 2057 var wds_theImage = new Image(); 2058 wds_theImage.src = jQuery(this).attr("src"); 2059 var wds_origWidth = wds_theImage.width; 2060 var wds_origHeight = wds_theImage.height; 2061 if (typeof wds_theImage.remove != 'undefined') { 2062 wds_theImage.remove(); 2063 } 2064 var wds_imageWidth = jQuery(this).attr("data-wds-image-width"); 2065 var wds_imageHeight = jQuery(this).attr("data-wds-image-height"); 2066 var wds_imageTop = jQuery(this).attr("data-wds-image-top"); 2067 var wds_width = wds_imageWidth; 2068 if (wds_imageWidth > wds_origWidth) { 2069 wds_width = wds_origWidth; 2070 } 2071 var wds_height = wds_imageHeight; 2072 if (wds_imageHeight > wds_origHeight) { 2073 wds_height = wds_origHeight; 2074 } 2075 var top_px = parseFloat(wds_imageTop) * wds_params[wds].image_height / 100; 2076 jQuery(this).css({ 2077 maxWidth: (parseFloat(wds_imageWidth) * ratio) + "px", 2078 maxHeight: (parseFloat(wds_imageHeight) * ratio) + "px", 2079 top: ((top_px * (slide_height - ratio * wds_imageHeight) / (wds_params[wds].image_height - wds_imageHeight)) * 100 / slide_height) + "%", 2080 }); 2081 if (jQuery(this).attr("data-wds-scale") != "on") { 2082 jQuery(this).css({ 2083 width: (parseFloat(wds_imageWidth) * ratio) + "px", 2084 height: (parseFloat(wds_imageHeight) * ratio) + "px", 2085 }); 2086 } 2087 else if (wds_imageWidth >= wds_origWidth || wds_imageHeight >= wds_origHeight) { 2088 if (wds_origWidth / wds_imageWidth > wds_origHeight / wds_imageHeight) { 2089 jQuery(this).css({ 2090 width: (parseFloat(wds_imageWidth) * ratio) + "px" 2091 }); 2092 } 2093 else { 2094 jQuery(this).css({ 2095 height: (parseFloat(wds_imageHeight) * ratio) + "px" 2096 }); 2097 } 2098 } 2099 }); 2100 2101 jQuery(".wds_slideshow_image_"+wds+" [data-type='hotspot']").each(function () { 2102 jQuery(this).children().each(function () { 2103 var width = jQuery(this).attr("data-width"); 2104 if (jQuery(this).attr("data-type") == "hotspot_text") { 2105 var height = jQuery(this).attr("data-height"); 2106 if (width != 0) { 2107 jQuery(this).width(ratio * width); 2108 } 2109 if (height != 0) { 2110 jQuery(this).height(ratio * height); 2111 } 2112 var min_font_size; 2113 var font_size; 2114 min_font_size = jQuery(this).attr("data-fmin-size"); 2115 font_size = ratio * jQuery(this).attr("data-fsize"); 2116 if (min_font_size > font_size) { 2117 font_size = min_font_size; 2118 } 2119 jQuery(this).css({fontSize: font_size + "px"}); 2120 } 2121 else { 2122 if (width != 0) { 2123 jQuery(this).width(ratio * width); 2124 jQuery(this).height(ratio * width); 2125 jQuery(this).parent().width(ratio * width); 2126 jQuery(this).parent().height(ratio * width); 2127 } 2128 jQuery(this).css({ 2129 borderWidth: ratio * jQuery(this).attr("data-border-width") 2130 }); 2131 } 2132 }); 2133 }); 2134 2135 jQuery(".wds_slideshow_image_"+wds+" span, .wds_slideshow_image_"+wds+" i").each(function () { 2136 var font_size; 2137 var ratio_new; 2138 var font_size_new; 2139 var min_font_size; 2140 font_size = parseFloat(jQuery(this).attr("data-wds-fsize")) * ratio; 2141 font_size_new = font_size; 2142 ratio_new = ratio; 2143 if (jQuery(this).attr('data-type') == 'wds_text_parent') { 2144 min_font_size = jQuery(this).attr("data-wds-fmin-size"); 2145 if (min_font_size > font_size) { 2146 font_size_new = min_font_size; 2147 ratio_new = ratio * font_size_new / font_size; 2148 } 2149 } 2150 jQuery(this).css({ 2151 fontSize: (font_size_new) + "px", 2152 lineHeight: "1.25em", 2153 paddingLeft: (parseFloat(jQuery(this).attr("data-wds-fpaddingl")) * ratio_new) + "px", 2154 paddingRight: (parseFloat(jQuery(this).attr("data-wds-fpaddingr")) * ratio_new) + "px", 2155 paddingTop: (parseFloat(jQuery(this).attr("data-wds-fpaddingt")) * ratio_new) + "px", 2156 paddingBottom: (parseFloat(jQuery(this).attr("data-wds-fpaddingb")) * ratio_new) + "px", 2157 }); 2158 }); 2159 2160 if ( !wds_object.is_free ) { 2161 wds_display_hotspot(); 2162 wds_hotspot_position("", ratio); 2163 } 2164 if (wds_params[wds].parallax_effect == 1) { 2165 wds_parallax( wds ); 2166 } 2167 jQuery(".wds_slideshow_image_"+wds+" [data-type='wds_text_parent']").each(function () { 2168 var id = jQuery(this).attr("id"); 2169 if (wds_params[wds].wds_data[jQuery("#" + id).data("row-key")]["layer_"+ jQuery("#" + id).data("layer-key") +"_align_layer"] == 1) { 2170 var left; 2171 var slider_width = jQuery(".wds_slider_"+ wds).outerWidth(); 2172 var start_left_percent = jQuery(this).attr("data-left-percent"); 2173 2174 /* Fix layer position only one time */ 2175 if( typeof textLayerPosition[wds] == 'undefined') { 2176 if (start_left_percent == 0) { 2177 textLayerPosition[wds] = 'left'; 2178 } /* layer width < slider_with/2 */ 2179 else if ( Math.ceil((jQuery("#" + id).offset().left) - (jQuery(".wds_slideshow_image_"+wds).offset().left)+jQuery(this).outerWidth()) >= slider_width ) { 2180 textLayerPosition[wds] = 'right'; 2181 } 2182 else { 2183 textLayerPosition[wds] = 'center'; 2184 } 2185 } 2186 if( textLayerPosition[wds] == 'left' ) { 2187 left = 0; 2188 } else if( textLayerPosition[wds] == 'center') { 2189 left = slider_width / 2 - jQuery(this).outerWidth() / 2; 2190 } else { 2191 left = slider_width - jQuery(this).outerWidth(); 2192 } 2193 2194 var left_percent = (slider_width != 0) ? 100 * left / slider_width : 0; 2195 jQuery("#" + id).css({left:left_percent + "%"}); 2196 } 2197 }); 2198 wds_resize_instagram_post( wds ); 2199 wds_window_fixed_size( wds, "#wds_image_id_"+wds+"_" + wds_params[wds].wds_data[parseInt(j
2199Query('#wds_current_image_key_'+wds).val())]["id"]); 2200} 2201 2202function wds_full_width( wds ) { 2203 var left = jQuery("#wds_container1_"+wds).offset().left; 2204 jQuery(".wds_slideshow_image_wrap_"+wds).css({ 2205 left: (-left) + "px", 2206 width: (jQuery(window).width()) + "px", 2207 maxWidth: "none" 2208 }); 2209} 2210 2211function wds_ready_func( wds ) { 2212 jQuery.each( wds_params[wds].callback_items, function( index, value ) { 2213 if ( index === 'onSliderI' && value !== '' ) { 2214 var wds_callback_f = new Function( wds_params[wds].callback_items.onSliderI ); 2215 wds_callback_f(); 2216 } 2217 }); 2218 if (wds_params[wds].enable_slideshow_autoplay && wds_params[wds].stop_animation) { 2219 jQuery("#wds_container1_"+wds).mouseover(function(e) { 2220 wds_stop_animation( wds ); 2221 }); 2222 jQuery("#wds_container1_"+wds).mouseout(function(e) { 2223 if (!e) { 2224 var e = window.event; 2225 } 2226 var reltg = (e.relatedTarget) ? e.relatedTarget : e.toElement; 2227 if (typeof reltg != "undefined") { 2228 if (reltg != null) { 2229 if (typeof reltg.tagName != "undefined") { 2230 while (reltg.tagName != 'BODY') { 2231 if (reltg.id == this.id){ 2232 return; 2233 } 2234 reltg = reltg.parentNode; 2235 } 2236 } 2237 } 2238 } 2239 wds_play_animation(wds); 2240 }); 2241 } 2242 2243 if (wds_params[wds].bull_butt_img_or_not == 'text') { 2244 wds_set_text_dots_cont(wds); 2245 } 2246 jQuery(".wds_slideshow_image_"+wds+" span, .wds_slideshow_image_"+wds+" i").each(function () { 2247 jQuery(this).attr("data-wds-fpaddingl", jQuery(this).css("paddingLeft")); 2248 jQuery(this).attr("data-wds-fpaddingr", jQuery(this).css("paddingRight")); 2249 jQuery(this).attr("data-wds-fpaddingt", jQuery(this).css("paddingTop")); 2250 jQuery(this).attr("data-wds-fpaddingb", jQuery(this).css("paddingBottom")); 2251 }); 2252 2253 if (wds_params[wds].navigation) { 2254 jQuery("#wds_container2_"+wds).hover(function () { 2255 jQuery(".wds_right-ico_"+wds).animate({left: 0}, 0, "swing"); 2256 jQuery(".wds_left-ico_"+wds).animate({left: 0}, 0, "swing"); 2257 jQuery("#wds_slideshow_play_pause_"+wds).animate({opacity: 1, filter: "Alpha(opacity=100)"}, 0, "swing"); 2258 }, function () { 2259 jQuery(".wds_right-ico_"+wds).css({left: 4000}); 2260 jQuery(".wds_left-ico_"+wds).css({left: -4000}); 2261 jQuery("#wds_slideshow_play_pause_"+wds).css({opacity: 0, filter: "Alpha(opacity=0)"}); 2262 }); 2263 } 2264 2265 if (!wds_params[wds].bull_hover) { 2266 jQuery("#wds_container2_"+wds).hover(function () { 2267 jQuery(".wds_slideshow_dots_container_"+wds).animate({opacity: 1, filter: "Alpha(opacity=100)"}, 0, "swing"); 2268 }, function () { 2269 jQuery(".wds_slideshow_dots_container_"+wds).css({opacity: 0, filter: "Alpha(opacity=0)"}); 2270 }); 2271 } 2272 wds_resize_slider( wds ); 2273 2274 if ( wds_params[wds].carousel != 1 ) { 2275 jQuery("#wds_container2_"+wds).css({visibility: 'visible'}); 2276 jQuery(".wds_loading").hide(); 2277 } 2278 2279 2280 function wds_filmstrip_move_left() { 2281 if (typeof jQuery().stop !== 'undefined') { 2282 if (jQuery.isFunction(jQuery().stop)) { 2283 jQuery(".wds_slideshow_filmstrip_thumbnails_" + wds).stop(true, false); 2284 } 2285 } 2286 2287 if (wds_params[wds].left_or_top == 'top') { 2288 if (jQuery(".wds_slideshow_filmstrip_thumbnails_" + wds).position().top < 0) { 2289 jQuery(".wds_slideshow_filmstrip_right_" + wds).css({opacity: 1, filter: "Alpha(opacity=100)"}); 2290 if (jQuery(".wds_slideshow_filmstrip_thumbnails_" + wds).position().top > -wds_params[wds].filmstrip_thumb_margin_hor - wds_params[wds].filmstrip_width) { 2291 jQuery(".wds_slideshow_filmstrip_thumbnails_" + wds).animate({top: 0}, 100, 'linear'); 2292 } 2293 else { 2294 jQuery(".wds_slideshow_filmstrip_thumbnails_" + wds).animate({top: (jQuery(".wds_slideshow_filmstrip_thumbnails_" + wds).position().top + wds_params[wds].filmstrip_thumb_margin_hor + wds_params[wds].filmstrip_width)}, 100, 'linear'); 2295 } 2296 } 2297 /* Disable left arrow.*/ 2298 window.setTimeout(function () { 2299 if (jQuery(".wds_slideshow_filmstrip_thumbnails_" + wds).position().top == 0) { 2300 jQuery(".wds_slideshow_filmstrip_left_" + wds).css({opacity: 0.3, filter: "Alpha(opacity=30)"}); 2301 } 2302 }, 500); 2303 } 2304 else if (wds_params[wds].left_or_top == 'left') { 2305 if (jQuery(".wds_slideshow_filmstrip_thumbnails_" + wds).position().left < 0) { 2306 jQuery(".wds_slideshow_filmstrip_right_" + wds).css({opacity: 1, filter: "Alpha(opacity=100)"}); 2307 if (jQuery(".wds_slideshow_filmstrip_thumbnails_" + wds).position().left > -wds_params[wds].filmstrip_thumb_margin_hor - wds_params[wds].filmstrip_width) { 2308 jQuery(".wds_slideshow_filmstrip_thumbnails_" + wds).animate({left: 0}, 100, 'linear'); 2309 } 2310 else { 2311 jQuery(".wds_slideshow_filmstrip_thumbnails_" + wds).animate({left: (jQuery(".wds_slideshow_filmstrip_thumbnails_" + wds).position().left + wds_params[wds].filmstrip_thumb_margin_hor + wds_params[wds].filmstrip_width)}, 100, 'linear'); 2312 } 2313 } 2314 window.setTimeout(function () { 2315 if (jQuery(".wds_slideshow_filmstrip_thumbnails_" + wds).position().left == 0) { 2316 jQuery(".wds_slideshow_filmstrip_left_" + wds).css({opacity: 0.3, filter: "Alpha(opacity=30)"}); 2317 } 2318 }, 500); 2319 } 2320 } 2321 2322 function wds_filmstrip_move_right() { 2323 if (typeof jQuery().stop !== 'undefined') { 2324 if (jQuery.isFunction(jQuery().stop)) { 2325 jQuery(".wds_slideshow_filmstrip_thumbnails_" + wds).stop(true, false); 2326 } 2327 } 2328 if (wds_params[wds].left_or_top == 'top') { 2329 if (jQuery(".wds_slideshow_filmstrip_thumbnails_" + wds).position().top >= -(jQuery(".wds_slideshow_filmstrip_thumbnails_" + wds).height() - jQuery(".wds_slideshow_filmstrip_container_" + wds).height())) { 2330 jQuery(".wds_slideshow_filmstrip_left_" + wds).css({opacity: 1, filter: "Alpha(opacity=100)"}); 2331 if (jQuery(".wds_slideshow_filmstrip_thumbnails_" + wds).position().top < -(jQuery(".wds_slideshow_filmstrip_thumbnails_" + wds).height() - jQuery(".wds_slideshow_filmstrip_container_" + wds).height() - wds_params[wds].filmstrip_thumb_margin_hor - wds_params[wds].filmstrip_width)) { 2332 jQuery(".wds_slideshow_filmstrip_thumbnails_" + wds).animate({top: -(jQuery(".wds_slideshow_filmstrip_thumbnails_" + wds).height() - jQuery(".wds_slideshow_filmstrip_container_" + wds).height())}, 100, 'linear'); 2333 } 2334 else { 2335 jQuery(".wds_slideshow_filmstrip_thumbnails_" + wds).animate({top: (jQuery(".wds_slideshow_filmstrip_thumbnails_" + wds).position().top - wds_params[wds].filmstrip_thumb_margin_hor - wds_params[wds].filmstrip_width)}, 100, 'linear'); 2336 } 2337 } 2338 /* Disable right arrow.*/ 2339 window.setTimeout(function () { 2340 if (jQuery(".wds_slideshow_filmstrip_thumbnails_" + wds).position().top == -(jQuery(".wds_slideshow_filmstrip_thumbnails_" + wds).height() - jQuery(".wds_slideshow_filmstrip_container_" + wds).height())) { 2341 jQuery(".wds_slideshow_filmstrip_right_" + wds).css({opacity: 0.3, filter: "Alpha(opacity=30)"}); 2342 } 2343 }, 500); 2344 } 2345 else if (wds_params[wds].left_or_top == 'left') { 2346 if (jQuery(".wds_slideshow_filmstrip_thumbnails_" + wds).position().left >= -(jQuery(".wds_slideshow_filmstrip_thumbnails_" + wds).width() - jQuery(".wds_slideshow_filmstrip_container_" + wds).width())) { 2347 jQuery(".wds_slideshow_filmstrip_left_" + wds).css({opacity: 1, filter: "Alpha(opacity=100)"}); 2348 if (jQuery(".wds_slideshow_filmstrip_thumbnails_" + wds).position().left < -(jQuery(".wds_slideshow_filmstrip_thumbnails_" + wds).width() - jQuery(".wds_slideshow_filmstrip_container_" + wds).width() - wds_params[wds].filmstrip_thumb_margin_hor - wds_params[wds].filmstrip_width)) { 2349 jQuery(".wds_slideshow_filmstrip_thumbnails_" + wds).animate({left: -(jQuery(".wds_slideshow_filmstrip_thumbnails_" + wds).width() - jQuery(".wds_slideshow_filmstrip_container_" + wds).width())}, 100, 'linear'); 2350 } 2351 else { 2352 jQuery(".wds_slideshow_filmstrip_thumbnails_" + wds).animate({left: (jQuery(".wds_slideshow_filmstrip_thumbnails_" + wds).position().left - wds_params[wds].filmstrip_thumb_margin_hor - wds_params[wds].filmstrip_width)}, 100, 'linear'); 2353 } 2354 } 2355 /* Disable right arrow.*/ 2356 window.setTimeout(function () { 2357 if (jQuery(".wds_slideshow_filmstrip_thumbnails_" + wds).position().left == -(jQuery(".wds_slideshow_filmstrip_thumbnails_" + wds).width() - jQuery(".wds_slideshow_filmstrip_container_" + wds).width())) { 2358 jQuery(".wds_slideshow_filmstrip_right_" + wds).css({opacity: 0.3, filter: "Alpha(opacity=30)"}); 2359 } 2360 }, 500); 2361 } 2362 } 2363 2364 if (wds_params[wds].slider_effect == 'zoomFade') {
2365 wds_genBgPos("#wds_image_id_"+wds+"_" + wds_params[wds].wds_data[parseInt(jQuery('#wds_current_image_key_'+wds).val())]["id"]); 2366 } 2367 if (wds_params[wds].image_right_click) { 2368 /* Disable right click.*/ 2369 jQuery('div[id^="wds_container"]').bind("contextmenu", function () { 2370 return false; 2371 }); 2372 } 2373 if (wds_params[wds].slider_effect == 'fade') { 2374 var curr_img_id = wds_params[wds].wds_data[parseInt(jQuery('#wds_current_image_key_'+wds).val())]["id"]; 2375 jQuery("#wds_image_id_"+wds+"_" + curr_img_id).css('transition', 'opacity ' + wds_params[wds].wds_transition_duration + 'ms linear'); 2376 } 2377 var isMobile = (/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(navigator.userAgent.toLowerCase())); 2378 if (isMobile) { 2379 if (wds_params[wds].touch_swipe_nav) { 2380 wds_swipe(wds); 2381 } 2382 } 2383 else { 2384 if (wds_params[wds].mouse_swipe_nav) { 2385 wds_swipe(wds); 2386 } 2387 } 2388 2389 function wds_swipe(wds) { 2390 if (typeof jQuery().swiperight !== 'undefined') { 2391 if (jQuery.isFunction(jQuery().swiperight)) { 2392 jQuery('.wds_slideshow_filmstrip_thumbnails_'+wds).swiperight(function () { 2393 wds_filmstrip_move_left(); 2394 return false; 2395 }); 2396 jQuery('#wds_container1_'+wds).swiperight(function () {
2397 wds_change_image(wds, parseInt(jQuery('#wds_current_image_key_'+wds).val()), (parseInt(jQuery('#wds_current_image_key_'+wds).val()) - wds_iterator_wds(wds)) >= 0 ? (parseInt(jQuery('#wds_current_image_key_'+wds).val()) - wds_iterator_wds( wds )) % wds_params[wds].wds_data.length : wds_params[wds].wds_data.length - 1, wds_params[wds].wds_data, false, "left"); 2398 if ( wds_params[wds].carousel == 1 ) { 2399 wds_carousel[wds].prev(); 2400 } 2401 jQuery.each( wds_params[wds].callback_items, function( index, value ) { 2402 if ( index === 'onSwipeS' && value !== '' ) { 2403 var wds_callback_f = new Function( wds_params[wds].callback_items.onSwipeS ); 2404 wds_callback_f(); 2405 } 2406 }); 2407 return false; 2408 }); 2409 } 2410 } 2411 if (typeof jQuery().swipeleft !== 'undefined') { 2412 if (jQuery.isFunction(jQuery().swipeleft)) { 2413 jQuery('.wds_slideshow_filmstrip_thumbnails_'+wds).swipeleft(function () { 2414 wds_filmstrip_move_right(); 2415 return false; 2416 }); 2417 jQuery('#wds_container1_'+wds).swipeleft(function () {
2418 wds_change_image(wds, parseInt(jQuery('#wds_current_image_key_'+wds).val()), (parseInt(jQuery('#wds_current_image_key_'+wds).val()) + wds_iterator_wds(wds)) % wds_params[wds].wds_data.length, wds_params[wds].wds_data, false, "right"); 2419 if ( wds_params[wds].carousel == 1 ) { 2420 wds_carousel[wds].next(); 2421 } 2422 jQuery.each( wds_params[wds].callback_items, function( index, value ) { 2423 if ( index === 'onSwipeS' && value !== '' ) { 2424 var wds_callback_f = new Function( wds_params[wds].callback_items.onSwipeS ); 2425 wds_callback_f(); 2426 } 2427 }); 2428 return false; 2429 }); 2430 } 2431 } 2432 } 2433 2434 var wds_click = isMobile ? 'touchend' : 'click'; 2435 var mousewheelevt = (/Firefox/i.test(navigator.userAgent)) ? "DOMMouseScroll" : "mousewheel"; /* FF doesn't recognize mousewheel as of FF3.x */ 2436 jQuery('.wds_slideshow_filmstrip_'+wds).bind(mousewheelevt, function(e) { 2437 var evt = window.event || e; /* Equalize event object.*/ 2438 evt = evt.originalEvent ? evt.originalEvent : evt; /* Convert to originalEvent if possible.*/ 2439 var delta = evt.detail ? evt.detail*(-40) : evt.wheelDelta; /* Check for detail first, because it is used by Opera and FF.*/ 2440 if (delta > 0) { 2441 /* Scroll up.*/ 2442 jQuery(".wds_slideshow_filmstrip_left_"+wds).trigger("click"); 2443 } 2444 else { 2445 /* Scroll down.*/ 2446 jQuery(".wds_slideshow_filmstrip_right_"+wds).trigger("click"); 2447 } 2448 return false; 2449 }); 2450 jQuery(".wds_slideshow_filmstrip_right_"+wds).on(wds_click, function () { 2451 wds_filmstrip_move_right(); 2452 }); 2453 jQuery(".wds_slideshow_filmstrip_left_"+wds).on(wds_click, function () { 2454 wds_filmstrip_move_left(); 2455 }); 2456 2457 /* Set filmstrip initial position.*/ 2458 (wds_params[wds].width_or_height == 'width') ? wds_set_filmstrip_pos(wds, jQuery(".wds_slideshow_filmstrip_container_"+wds).width()) : wds_set_filmstrip_pos(wds, jQuery(".wds_slideshow_filmstrip_container_"+wds).height()); 2459 2460 function wds_message_listener(e) { 2461 try { 2462 var data = JSON.parse(e.data); 2463 if (data.method == "paused") { 2464 wds_params[wds].iframe_message_received = wds_params[wds].iframe_message_received + 1; 2465 if (data.value == false) { 2466 wds_params[wds].video_is_playing = true; 2467 } 2468 } 2469 } catch (e) { 2470 return false; 2471 } 2472 } 2473 2474 if (window.addEventListener){ 2475 window.addEventListener('message', wds_message_listener, false); 2476 } 2477 else { 2478 window.attachEvent('onmessage', wds_message_listener, false); 2479 } 2480 /* Mouswheel navigation.*/ 2481 if ( wds_params[wds].mouse_wheel_nav) { 2482 jQuery('.wds_slide_container_'+wds).bind(mousewheelevt, function(e) { 2483 var evt = window.event || e; /* Equalize event object.*/ 2484 evt = evt.originalEvent ? evt.originalEvent : evt; /* Convert to originalEvent if possible.*/ 2485 var delta = evt.detail ? evt.detail*(-40) : evt.wheelDelta; /* Check for detail first, because it is used by Opera and FF.*/ 2486 if (delta > 0) { 2487 /* Scroll up.*/
2488 wds_change_image(wds, parseInt(jQuery('#wds_current_image_key_'+wds).val()), (parseInt(jQuery('#wds_current_image_key_'+wds).val()) - wds_iterator_wds(wds)) >= 0 ? (parseInt(jQuery('#wds_current_image_key_'+wds).val()) - wds_iterator_wds(wds)) % wds_params[wds].wds_data.length : wds_params[wds].wds_data.length - 1, wds_params[wds].wds_data, false, "left"); 2489 } 2490 else { 2491 /* Scroll down.*/ 2492 wds_change_image(wds, parseInt(jQuery('#wds_current_image_key_'+wds).val()), (parseInt(jQuery('#wds_current_image_key_'+wds).val()) + wds_iterator_wds(wds)) % wds_params[wds].wds_data.length, wds_params[wds].wds_data, false, "right"); 2493 } 2494 return false; 2495 }); 2496 } 2497 2498 /* Keyboard navigation.*/ 2499 if (wds_params[wds].keyboard_nav) { 2500 jQuery(document).on('keydown', function (e) { 2501 if (e.keyCode === 39 || e.keyCode === 38) { /* Right arrow.*/ 2502 wds_change_image(wds, parseInt(jQuery('#wds_current_image_key_'+wds).val()), (parseInt(jQuery('#wds_current_image_key_'+wds).val()) + wds_iterator_wds(wds)) % wds_params[wds].wds_data.length, wds_params[wds].wds_data, false, "right"); 2503 } 2504 else if (e.keyCode === 37 || e.keyCode === 40) { /* Left arrow.*/
2505 wds_change_image(wds, parseInt(jQuery('#wds_current_image_key_'+wds).val()), (parseInt(jQuery('#wds_current_image_key_'+wds).val()) - wds_iterator_wds(wds)) >= 0 ? (parseInt(jQuery('#wds_current_image_key_'+wds).val()) - wds_iterator_wds(wds)) % wds_params[wds].wds_data.length : wds_params[wds].wds_data.length - 1, wds_params[wds].wds_data, false, "left"); 2506 } 2507 else if (e.keyCode === 32) { /* Space.*/ 2508 wds_play_pause(wds); 2509 } 2510 }); 2511 } 2512 /* Play/pause.*/ 2513 jQuery("#wds_slideshow_play_pause_"+wds).on(wds_click, function () { 2514 wds_play_pause(wds); 2515 }); 2516 if (wds_params[wds].enable_slideshow_autoplay) { 2517 play_wds(wds); 2518 2519 jQuery(".wds_slideshow_play_pause_"+wds).attr("title", wds_object.pause); 2520 jQuery(".wds_slideshow_play_pause_"+wds).attr("class", "wds_ctrl_btn_"+wds+" wds_slideshow_play_pause_"+wds+" fa fa-pause"); 2521 if (wds_params[wds].enable_slideshow_music) { 2522 if (wds_params[wds].slideshow_music_url != '') { 2523 document.getElementById("wds_audio_"+wds).play(); 2524 } 2525 } 2526 if (wds_params[wds].timer_bar_type != 'none') { 2527 if (wds_params[wds].timer_bar_type != 'top') { 2528 if (wds_params[wds].timer_bar_type != 'bottom') { 2529 wds_circle_timer(wds, 0); 2530 } 2531 } 2532 } 2533 } 2534 2535 if (wds_params[wds].preload_images) { 2536 function wds_preload(wds, preload_key) { 2537 if (wds_params[wds].wds_data[preload_key]["is_video"] == 'image' && !wds_params[wds].wds_data[preload_key]["loaded"]) { 2538 jQuery('<img />') 2539 .on('load', function() { 2540 jQuery(this).remove(); 2541 if (preload_key < wds_params[wds].wds_data.length - 1) wds_preload(wds, preload_key + 1); 2542 }) 2543 .on('error', function() { 2544 jQuery(this).remove(); 2545 if (preload_key < wds_params[wds].wds_data.length - 1) wds_preload(wds, preload_key + 1); 2546 }) 2547 .attr("src", wds_params[wds].wds_data[preload_key]["image_url"]); 2548 wds_params[wds].wds_data[preload_key]["loaded"] = true; 2549 } 2550 else { 2551 if (preload_key < wds_params[wds].wds_data.length - 1) wds_preload(wds, preload_key + 1); 2552 } 2553 } 2554 wds_preload(wds, 0); 2555 } 2556 var first_slide_layers_count_wds = wds_params[wds].wds_data[wds_params[wds].start_slide_num]["slide_layers_count"]; 2557 if (first_slide_layers_count_wds) { 2558 /* Loop through layers in.*/ 2559 for (var j = 0; j < first_slide_layers_count_wds; j++) { 2560 wds_set_layer_effect_in_wds(wds, j, wds_params[wds].start_slide_num); 2561 } 2562 /* Loop through layers out.*/ 2563 for (var i = 0; i < first_slide_layers_count_wds; i++) { 2564 wds_set_layer_effect_out_wds(wds, i, wds_params[wds].start_slide_num); 2565 } 2566 } 2567 2568 if ( !wds_object.is_free ) { 2569 wds_video_dimenstion(wds, jQuery("#wds_current_image_key_"+wds).val()); 2570 } 2571 if (wds_params[wds].fixed_bg == 1) { 2572 wds_window_fixed_pos(wds); 2573 } 2574 jQuery(".wds_slideshow_filmstrip_container_"+wds).hover(function() { 2575 jQuery(".wds_slideshow_filmstrip_left_"+wds+" i, .wds_slideshow_filmstrip_right_"+wds+" i").animate({opacity: 1, filter: "Alpha(opacity=100)"}, 700, "swing"); 2576 }, function () { 2577 jQuery(".wds_slideshow_filmstrip_left_"+wds+" i, .wds_slideshow_filmstrip_right_"+wds+" i").animate({opacity: 0, filter: "Alpha(opacity=0)"}, 700, "swing"); 2578 }); 2579 jQuery("#wds_container1_"+wds).hover(function() { 2580 jQuery.each( wds_params[wds].callback_items, function( index, value ) { 2581 if ( index === 'onSliderHover' && value !== '' ) { 2582 var wds_callback_f = new Function( wds_params[wds].callback_items.onSliderHover ); 2583 wds_callback_f(); 2584 } 2585 }); 2586 }, function () { 2587 jQuery.each( wds_params[wds].callback_items, function( index, value ) { 2588 if ( index === 'onSliderBlur' && value !== '' ) { 2589 var wds_callback_f = new Function( wds_params[wds].callback_items.onSliderBlur ); 2590 jQuery('#top_right_' + wds).css({ 2591 '-moz-transform': 'rotate(0deg)', 2592 '-webkit-transform': 'rotate(0deg)', 2593 '-o-transform': 'rotate(0deg)', 2594 '-ms-transform': 'rotate(0deg)', 2595 'transform': 'rotate(0deg)',
2596 '-webkit-transform-origin': 'left bottom', 2597 '-ms-transform-origin': 'left bottom', 2598 '-moz-transform-origin': 'left bottom', 2599 'transform-origin': 'left bottom' 2600 }); 2601 jQuery('#bottom_right_' + wds).css({ 2602 '-moz-transform': 'rotate(0deg)', 2603 '-webkit-transform': 'rotate(0deg)', 2604 '-o-transform': 'rotate(0deg)', 2605 '-ms-transform': 'rotate(0deg)', 2606 'transform': 'rotate(0deg)', 2607 '-webkit-transform-origin': 'left top', 2608 '-ms-transform-origin': 'left top', 2609 '-moz-transform-origin': 'left top', 2610 'transform-origin': 'left top' 2611 }); 2612 jQuery('#bottom_left_' + wds).css({ 2613 '-moz-transform': 'rotate(0deg)', 2614 '-webkit-transform': 'rotate(0deg)', 2615 '-o-transform': 'rotate(0deg)', 2616 '-ms-transform': 'rotate(0deg)', 2617 'transform': 'rotate(0deg)', 2618 '-webkit-transform-origin': 'right top', 2619 '-ms-transform-origin': 'right top', 2620 '-moz-transform-origin': 'right top', 2621 'transform-origin': 'right top' 2622 }); 2623 jQuery('#top_left_' + wds).css({ 2624 '-moz-transform': 'rotate(0deg)', 2625 '-webkit-transform': 'rotate(0deg)', 2626 '-o-transform': 'rotate(0deg)', 2627 '-ms-transform': 'rotate(0deg)', 2628 'transform': 'rotate(0deg)', 2629 '-webkit-transform-origin': 'right bottom', 2630 '-ms-transform-origin': 'right bottom', 2631 '-moz-transform-origin': 'right bottom', 2632 'transform-origin': 'right bottom' 2633 }); 2634 wds_callback_f(); 2635 } 2636 }); 2637 }); 2638 jQuery("#wds_slideshow_play_pause_"+wds).on("click", ".fa-play", function() { 2639 jQuery.each( wds_params[wds].callback_items, function( index, value ) { 2640 if ( index === 'onSliderPlay' && value !== '' ) { 2641 var wds_callback_f = new Function( wds_params[wds].callback_items.onSliderPlay ); 2642 wds_callback_f(); 2643 } 2644 }); 2645 }); 2646 jQuery("#wds_slideshow_play_pause_"+wds).on("click", ".fa-pause", function() { 2647 jQuery.each( wds_params[wds].callback_items, function( index, value ) { 2648 if ( index === 'onSliderPause' && value !== '' ) { 2649 var wds_callback_f = new Function( wds_params[wds].callback_items.onSliderPause ); 2650 wds_callback_f(); 2651 } 2652 }); 2653 2654 }); 2655} 2656 2657function wds_pause(wds) { 2658 /* Pause.*/ 2659 /* Pause layers out effect.*/ 2660 wds_params[wds].wds_play_pause_state = 1; 2661 var current_key = jQuery('#wds_current_image_key_'+wds).val(); 2662 var current_slide_layers_count = wds_params[wds].wds_data[current_key]["slide_layers_count"]; 2663 setTimeout(function() { 2664 for (var k = 0; k < current_slide_layers_count; k++) { 2665 clearTimeout(wds_params[wds].wds_clear_layers_effects_out[current_key][k]); 2666 } 2667 }, wds_params[wds].wds_duration_for_clear_effects); 2668 window.clearInterval(wds_params[wds].wds_playInterval); 2669 jQuery(".wds_slideshow_play_pause_"+wds).attr("title", wds_object.play); 2670 jQuery(".wds_slideshow_play_pause_"+wds).attr("class", "wds_ctrl_btn_"+wds+" wds_slideshow_play_pause_"+wds+" fa fa-play"); 2671 if (wds_params[wds].enable_slideshow_music) { 2672 document.getElementById("wds_audio_"+wds).pause(); 2673 } 2674 if (typeof jQuery().stop !== 'undefined') { 2675 if (jQuery.isFunction(jQuery().stop)) { 2676 if (wds_params[wds].timer_bar_type == 'top' || wds_params[wds].timer_bar_type == 'bottom') { 2677 jQuery(".wds_line_timer_" + wds).stop(); 2678 } 2679 else if (wds_params[wds].timer_bar_type != 'none') { 2680 /* Pause circle timer.*/ 2681 if (typeof wds_params[wds].circle_timer_animate.stop !== 'undefined') { 2682 wds_params[wds].circle_timer_animate.stop(); 2683 if ( wds_params[wds].carousel == 1 ) { 2684 wds_carousel[wds].pause(); 2685 } 2686 jQuery('#top_right_' + wds).css({ 2687 '-moz-transform': 'rotate(0deg)', 2688 '-webkit-transform': 'rotate(0deg)', 2689 '-o-transform': 'rotate(0deg)', 2690 '-ms-transform': 'rotate(0deg)', 2691 'transform': 'rotate(0deg)', 2692 '-webkit-transform-origin': 'left bottom',
2693 '-ms-transform-origin': 'left bottom', 2694 '-moz-transform-origin': 'left bottom', 2695 'transform-origin': 'left bottom' 2696 }); 2697 jQuery('#bottom_right_' + wds).css({ 2698 '-moz-transform': 'rotate(0deg)', 2699 '-webkit-transform': 'rotate(0deg)', 2700 '-o-transform': 'rotate(0deg)', 2701 '-ms-transform': 'rotate(0deg)', 2702 'transform': 'rotate(0deg)', 2703 '-webkit-transform-origin': 'left top', 2704 '-ms-transform-origin': 'left top', 2705 '-moz-transform-origin': 'left top', 2706 'transform-origin': 'left top' 2707 }); 2708 jQuery('#bottom_left_' + wds).css({ 2709 '-moz-transform': 'rotate(0deg)', 2710 '-webkit-transform': 'rotate(0deg)', 2711 '-o-transform': 'rotate(0deg)', 2712 '-ms-transform': 'rotate(0deg)', 2713 'transform': 'rotate(0deg)', 2714 '-webkit-transform-origin': 'right top', 2715 '-ms-transform-origin': 'right top', 2716 '-moz-transform-origin': 'right top', 2717 'transform-origin': 'right top' 2718 }); 2719 jQuery('#top_left_' + wds).css({ 2720 '-moz-transform': 'rotate(0deg)', 2721 '-webkit-transform': 'rotate(0deg)', 2722 '-o-transform': 'rotate(0deg)', 2723 '-ms-transform': 'rotate(0deg)', 2724 'transform': 'rotate(0deg)', 2725 '-webkit-transform-origin': 'right bottom', 2726 '-ms-transform-origin': 'right bottom', 2727 '-moz-transform-origin': 'right bottom', 2728 'transform-origin': 'right bottom' 2729 }); 2730 } 2731 } 2732 } 2733 } 2734 if ( wds_params[wds].carousel == 1 ) { 2735 wds_carousel[wds].pause(); 2736 } 2737} 2738 2739function wds_play_pause(wds, play_pause) { 2740 if (typeof play_pause == "undefined") { 2741 var play_pause = ""; 2742 } 2743 if (play_pause == "") { 2744 if (jQuery(".wds_ctrl_btn_"+wds).hasClass("fa-play") || wds_params[wds].wds_play_pause_state) { 2745 wds_play_wds( wds ); 2746 } 2747 else { 2748 wds_pause( wds ); 2749 } 2750 } 2751 else if (play_pause == "play") { 2752 wds_play_wds( wds ); 2753 } 2754 else if (play_pause == "pause") { 2755 wds_pause( wds ); 2756 } 2757} 2758 2759function wds_stop_animation( wds ) { 2760 window.clearInterval(wds_params[wds].wds_playInterval); 2761 /* Pause layers out effect.*/ 2762 var current_key = jQuery('#wds_current_image_key_'+wds).val(); 2763 var current_slide_layers_count = wds_params[wds].wds_data[current_key]["slide_layers_count"]; 2764 2765 setTimeout(function() { 2766 for (var k = 0; k < current_slide_layers_count; k++) { 2767 clearTimeout(wds_params[wds].wds_clear_layers_effects_out[current_key][k]); 2768 } 2769 }, wds_params[wds].wds_duration_for_clear_effects); 2770 if (wds_params[wds].enable_slideshow_music) { 2771 document.getElementById("wds_audio_"+wds).pause(); 2772 } 2773 if (typeof jQuery().stop !== 'undefined') { 2774 if (jQuery.isFunction(jQuery().stop)) { 2775 if (wds_params[wds].timer_bar_type == 'top' || wds_params[wds].timer_bar_type == 'bottom') { 2776 jQuery(".wds_line_timer_"+wds).stop(); 2777 if ( wds_params[wds].carousel == 1 ) { 2778 wds_carousel[wds].pause(); 2779 } 2780 } 2781 else if (wds_params[wds].timer_bar_type != 'none') { 2782 wds_params[wds].circle_timer_animate.stop(); 2783 if ( wds_params[wds].carousel == 1 ) { 2784 wds_carousel[wds].pause(); 2785 } 2786 } 2787 } 2788 } 2789} 2790 2791function wds_play_animation( wds ) { 2792 if (jQuery(".wds_ctrl_btn_"+wds).hasClass("fa-play")) { 2793 return; 2794 } 2795 play_wds( wds ); 2796 if ( wds_params[wds].carousel == 1 ) { 2797 wds_carousel[wds].start(); 2798 } 2799 if (wds_params[wds].timer_bar_type != 'none') { 2800 if (wds_params[wds].timer_bar_type != 'bottom') { 2801 if (wds_params[wds].timer_bar_type != 'top') { 2802 if (typeof wds_params[wds].circle_timer_animate !== 'undefined') { 2803 wds_params[wds].circle_timer_animate.stop(); 2804 if ( wds_params[wds].carousel == 1 ) { 2805 wds_carousel[wds].pause(); 2806 } 2807 } 2808 wds_circle_timer(wds_params[wds].curent_time_deggree); 2809 } 2810 } 2811 } 2812 if (wds_params[wds].enable_slideshow_music) { 2813 if (wds_params[wds].slideshow_music_url != '') { 2814 document.getElementById("wds_audio_"+wds).play(); 2815 } 2816 } 2817 var next_slide_layers_count = wds_params[wds].wds_data[wds_params[wds].wds_current_key]["slide_layers_count"]; 2818 for (var i = 0; i < next_slide_layers_count; i++) { 2819 wds_set_layer_effect_out_wds(wds, i, wds_params[wds].wds_current_key); 2820 } 2821} 2822 2823function wds_get_overall_parent(obj) { 2824 if (obj.parent().width()) { 2825 obj.width(obj.parent().width()); 2826 return obj.parent().width(); 2827 } 2828 else { 2829 return wds_get_overall_parent(obj.parent()); 2830 } 2831} 2832 2833function wds_circle_timer(wds, angle) { 2834 wds_params[wds].circle_timer_animate = jQuery({deg: angle}).animate({deg: 360}, { 2835 duration: wds_params[wds].slideshow_interval * 1000, 2836 step: function (now) { 2837 wds_params[wds].curent_time_deggreewds = now; 2838 if (now >= 0) { 2839 if (now < 271) { 2840 jQuery('#top_right_' + wds).css({
2841 '-moz-transform': 'rotate(' + now + 'deg)', 2842 '-webkit-transform': 'rotate(' + now + 'deg)', 2843 '-o-transform': 'rotate(' + now + 'deg)', 2844 '-ms-transform': 'rotate(' + now + 'deg)', 2845 'transform': 'rotate(' + now + 'deg)', 2846 '-webkit-transform-origin': 'left bottom', 2847 '-ms-transform-origin': 'left bottom', 2848 '-moz-transform-origin': 'left bottom', 2849 'transform-origin': 'left bottom' 2850 }); 2851 } 2852 } 2853 if (now >= 90) { 2854 if (now < 271) { 2855 wds_params[wds].bottom_right_deggree_wds = now - 90; 2856 jQuery('#bottom_right_' + wds).css({ 2857 '-moz-transform': 'rotate(' + wds_params[wds].bottom_right_deggree_wds + 'deg)', 2858 '-webkit-transform': 'rotate(' + wds_params[wds].bottom_right_deggree_wds + 'deg)', 2859 '-o-transform': 'rotate(' + wds_params[wds].bottom_right_deggree_wds + 'deg)', 2860 '-ms-transform': 'rotate(' + wds_params[wds].bottom_right_deggree_wds + 'deg)', 2861 'transform': 'rotate(' + wds_params[wds].bottom_right_deggree_wds + 'deg)', 2862 '-webkit-transform-origin': 'left top', 2863 '-ms-transform-origin': 'left top', 2864 '-moz-transform-origin': 'left top', 2865 'transform-origin': 'left top' 2866 }); 2867 } 2868 } 2869 if (now >= 180) { 2870 if (now < 361) { 2871 wds_params[wds].bottom_left_deggree_wds = now - 180; 2872 jQuery('#bottom_left_' + wds).css({ 2873 '-moz-transform': 'rotate(' + wds_params[wds].bottom_left_deggree_wds + 'deg)', 2874 '-webkit-transform': 'rotate(' + wds_params[wds].bottom_left_deggree_wds + 'deg)', 2875 '-o-transform': 'rotate(' + wds_params[wds].bottom_left_deggree_wds + 'deg)', 2876 '-ms-transform': 'rotate(' + wds_params[wds].bottom_left_deggree_wds + 'deg)', 2877 'transform': 'rotate(' + wds_params[wds].bottom_left_deggree_wds + 'deg)', 2878 '-webkit-transform-origin': 'right top', 2879 '-ms-transform-origin': 'right top', 2880 '-moz-transform-origin': 'right top', 2881 'transform-origin': 'right top' 2882 }); 2883 } 2884 } 2885 if (now >= 270) { 2886 if (now < 361) { 2887 wds_params[wds].top_left_deggree_wds = now - 270; 2888 jQuery('#top_left_' + wds).css({ 2889 '-moz-transform': 'rotate(' + wds_params[wds].top_left_deggree_wds + 'deg)', 2890 '-webkit-transform': 'rotate(' + wds_params[wds].top_left_deggree_wds + 'deg)', 2891 '-o-transform': 'rotate(' + wds_params[wds].top_left_deggree_wds + 'deg)', 2892 '-ms-transform': 'rotate(' + wds_params[wds].top_left_deggree_wds + 'deg)', 2893 'transform': 'rotate(' + wds_params[wds].top_left_deggree_wds + 'deg)', 2894 '-webkit-transform-origin': 'right bottom', 2895 '-ms-transform-origin': 'right bottom', 2896 '-moz-transform-origin': 'right bottom', 2897 'transform-origin': 'right bottom' 2898 }); 2899 } 2900 } 2901 } 2902 }); 2903} 2904 2905function wds_slide_redirect_link(event, url, target) { 2906 if ( event.target.className != 'wds_play_btn_cont' && event.target.className != 'wds_bigplay_layer' && event.target.className != '') { 2907 window.open(url,target); 2908 } 2909} 2910 2911function wds_playVideo( wds_player ) {} 2912function wds_parallax(wds, slide_id) {} 2913function wds_embed_slide_autoplay(slide_id, wds) {} 2914function wds_video_dimenstion(wds, current_key) {} 2915function wds_upvideo_layer_dimenstion(wds, key, j) {} 2916function wds_video_play_pause(wds, id) {} 2917function wds_video_play_pause_layer(event, wds, slide_id, layer_id) {}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.