var YTdeferred = jQuery.Deferred(); window.onYouTubeIframeAPIReady = function() { //resolve when youtube callback is called passing YT as a parameter YTdeferred.resolve(window.YT);
}; YTdeferred.done(function(YT) {
jQuery('.huge-it-iframe').each(function(){
var el_id = jQuery(this).attr('data-element-id'); var volume = HUGEIT_YT_IFRAMES['iframe'+el_id]['volume'];
window['onPlayerReady'+el_id] = function(event) { window['player_'+el_id]['setVolume'](volume); } });
jQuery('.huge-it-iframe').each(function(){
var id = jQuery(this).attr('id'); var el_id = jQuery(this).attr('data-element-id'); var controls = HUGEIT_YT_IFRAMES['iframe'+el_id]['controls']; var showinfo = HUGEIT_YT_IFRAMES['iframe'+el_id]['showinfo']; var url = HUGEIT_YT_IFRAMES['iframe'+el_id]['videoId']; controls||(controls = 0); showinfo||(showinfo = 0);
window['player_'+el_id] = new YT.Player(id, { height: '', width: '', videoId: url, playerVars: { 'controls': controls, 'showinfo': showinfo, 'rel':0 }, events: { 'onError': window['onPlayerError'+el_id], 'onReady': window['onPlayerReady'+el_id], 'onStateChange': window['onPlayerStateChange'+el_id], 'loop':1 } }); }) });
jQuery(function(){
jQuery('.huge-it-iframe').each(function(){
var el_id = jQuery(this).attr('data-element-id'); var quality = HUGEIT_YT_IFRAMES['iframe'+el_id]['quality'];
window['onPlayerStateChange'+el_id] = function(event) {
if (event.data == YT.PlayerState.PLAYING) { HUGEIT_YT_IFRAMES['iframe'+el_id]['state']='played'; event.target.setPlaybackQuality(quality); } } });
}); function stopYoutubeVideo(currentVideo,nextVideo) {
if(currentVideo) { (HUGEIT_YT_IFRAMES['iframe'+currentVideo]['state'])?currentVideo&&(window['player_'+currentVideo]['pauseVideo']()):currentVideo&&(window['player_'+currentVideo]['stopVideo']()); } nextVideo&&HUGEIT_YT_IFRAMES['iframe'+nextVideo]['autoplay']&&(window['player_'+nextVideo]['playVideo']()); }
function stopVimeoVideo(currentVideo,nextVideo){
jQuery(currentVideo).vimeo('pause');
jQuery(nextVideo).vimeo('play');
}
/***
jQuery( window ).load(function() {
(function VimeoOptionsReady(){ //calling funtion once jQuery('.huge-it-iframe-vimeo').each(function(){ var el_id = jQuery(this).attr('data-element-id'); jQuery(this).vimeo('setColor',HUGEIT_VIMEOS['iframe'+el_id]['color']); jQuery(this).vimeo('setVolume',HUGEIT_VIMEOS['iframe'+el_id]['volume']); }) }());
if('' == 'on') {
if(jQuery('.huge-it-iframe-vimeo.autoplay').length) {
(function AutoplayVimeo() { var setplayVideo = setInterval(hugeitframe, 100); function hugeitframe() { var vimeo1 = jQuery('.huge_it_slider_ li').first().find('.autoplay') if(vimeo1.length) { vimeo1.vimeo('play'); clearInterval(setplayVideo); } } }()); }
if(jQuery('.huge-it-iframe.autoplay').length) {
(function AutoplayYoutube() { var setplayVideo = setInterval(hugeitframe, 100); function hugeitframe() { jQuery('.huge-it-iframe.autoplay').each(function(){
var el_id = jQuery(this).attr('data-element-id');
if(window['player_'+el_id]) { window['player_'+el_id]['playVideo'](); clearInterval(setplayVideo); } }); } }()); } } });
/*** initialize***/
jQuery(document).ready(function() {
jQuery('.thumb_wrapper').on('click', function(ev) { var myid = jQuery(this).data('rowid'); myid = parseInt(myid); eval('player_' + myid + '.playVideo()'); ev.preventDefault();
}); });
if(typeof sliderID_array =="undefined") { var sliderID_array=[]; }
var data_ = []; var event_stack_ = []; data_["0"]=[];data_["0"]["id"]="0";data_["0"]["image_url"]="http://localhost/inc/wp-content/uploads/2017/02/Untitled-3-621x414.jpg";data_["0"]["description"]="";data_["0"]["alt"]="";data_["1"]=[];data_["1"]["id"]="1";data_["1"]["image_url"]="http://localhost/inc/wp-content/uploads/2017/02/Delhi-Elections-2015.jpg";data_["1"]["description"]="";data_["1"]["alt"]="";data_["2"]=[];data_["2"]["id"]="2";data_["2"]["image_url"]="http://localhost/inc/wp-content/uploads/2017/02/congress-manmohan-singh-pm-sonia-gandhi-rahul-family-persons-ad-621x414.png";data_["2"]["description"]="";data_["2"]["alt"]="";data_["3"]=[];data_["3"]["id"]="3";data_["3"]["image_url"]="http://localhost/inc/wp-content/uploads/2017/02/1779986_741179249233326_1710772605_n.jpg";data_["3"]["description"]="";data_["3"]["alt"]="";data_["4"]=[];data_["4"]["id"]="4";data_["4"]["image_url"]="http://localhost/inc/wp-content/uploads/2017/02/74288749_kattar-soch-20140213-1029-05-.jpg";data_["4"]["description"]="";data_["4"]["alt"]="";data_["5"]=[];data_["5"]["id"]="5";data_["5"]["image_url"]="http://localhost/inc/wp-content/uploads/2017/02/Mishra_IndiaandIdeology.jpg";data_["5"]["description"]="";data_["5"]["alt"]="";data_["6"]=[];data_["6"]["id"]="6";data_["6"]["image_url"]="http://localhost/inc/wp-content/uploads/2017/02/gandhi-kl3B-621x414@LiveMint.jpg";data_["6"]["description"]="";data_["6"]["alt"]="";data_["7"]=[];data_["7"]["id"]="7";data_["7"]["image_url"]="http://localhost/inc/wp-content/uploads/2017/02/Flag_of_the_Indian_National_Congress.svg_.png";data_["7"]["description"]="";data_["7"]["alt"]="";data_["8"]=[];data_["8"]["id"]="8";data_["8"]["image_url"]="http://localhost/inc/wp-content/uploads/2017/02/Untitled-3-621x414.jpg";data_["8"]["description"]="";data_["8"]["alt"]="";data_["9"]=[];data_["9"]["id"]="9";data_["9"]["image_url"]="http://localhost/inc/wp-content/uploads/2017/02/Delhi-Elections-2015.jpg";data_["9"]["description"]="";data_["9"]["alt"]="";data_["10"]=[];data_["10"]["id"]="10";data_["10"]["image_url"]="http://localhost/inc/wp-content/uploads/2017/02/congress-manmohan-singh-pm-sonia-gandhi-rahul-family-persons-ad-621x414.png";data_["10"]["description"]="";data_["10"]["alt"]="";data_["11"]=[];data_["11"]["id"]="11";data_["11"]["image_url"]="http://localhost/inc/wp-content/uploads/2017/02/1779986_741179249233326_1710772605_n.jpg";data_["11"]["description"]="";data_["11"]["alt"]="";data_["12"]=[];data_["12"]["id"]="12";data_["12"]["image_url"]="http://localhost/inc/wp-content/uploads/2017/02/74288749_kattar-soch-20140213-1029-05-.jpg";data_["12"]["description"]="";data_["12"]["alt"]=""; var huge_it_trans_in_progress_ = false; var huge_it_transition_duration_ = ; var huge_interval = {}; var id_array_index = sliderID_array.length;
sliderID_array[id_array_index] = // Stop autoplay. window.clearInterval(huge_interval['huge_it_playInterval_'+]);
var huge_it_current_key_ = ''; function huge_it_move_dots_() { var image_left = jQuery(".huge_it_slideshow_dots_active_").position().left; var image_right = jQuery(".huge_it_slideshow_dots_active_").position().left + jQuery(".huge_it_slideshow_dots_active_").outerWidth(true);
} function huge_it_testBrowser_cssTransitions_() { return huge_it_testDom_('Transition'); } function huge_it_testBrowser_cssTransforms3d_() { return huge_it_testDom_('Perspective'); } function huge_it_testDom_(prop) { // Browser vendor CSS prefixes. var browserVendors = ['', '-webkit-', '-moz-', '-ms-', '-o-', '-khtml-']; // Browser vendor DOM prefixes. var domPrefixes = ['', 'Webkit', 'Moz', 'ms', 'O', 'Khtml']; var i = domPrefixes.length; while (i--) { if (typeof document.body.style[domPrefixes[i] + prop] !== 'undefined') { return true; } } return false; } function huge_it_cube_(tz, ntx, nty, nrx, nry, wrx, wry, current_image_class, next_image_class, direction) {
/* If browser does not support 3d transforms/CSS transitions.*/ if (!huge_it_testBrowser_cssTransitions_()) { jQuery(".huge_it_slideshow_dots_").removeClass("huge_it_slideshow_dots_active_").addClass("huge_it_slideshow_dots_deactive_"); jQuery("#huge_it_dots_" + huge_it_current_key_ + "_").removeClass("huge_it_slideshow_dots_deactive_").addClass("huge_it_slideshow_dots_active_"); return huge_it_fallback_(current_image_class, next_image_class, direction); } if (!huge_it_testBrowser_cssTransforms3d_()) { return huge_it_fallback3d_(current_image_class, next_image_class, direction); } jQuery(current_image_class).css({'z-index': 'none'}); jQuery(next_image_class).css({'z-index' : 2}); huge_it_trans_in_progress_ = true; /* Set active thumbnail.*/ jQuery(".huge_it_slideshow_dots_").removeClass("huge_it_slideshow_dots_active_").addClass("huge_it_slideshow_dots_deactive_"); jQuery("#huge_it_dots_" + huge_it_current_key_ + "_").removeClass("huge_it_slideshow_dots_deactive_").addClass("huge_it_slideshow_dots_active_"); jQuery(".huge_it_slide_bg_").css('perspective', 1000); jQuery(current_image_class).css({ transform : 'translateZ(' + tz + 'px)', backfaceVisibility : 'hidden' });
jQuery(".huge_it_slideshow_image_wrap_,.huge_it_slide_bg_,.huge_it_slideshow_image_item_,.huge_it_slideshow_image_second_item_ ").css('overflow', 'visible');
jQuery(next_image_class).css({ opacity : 1, filter: 'Alpha(opacity=100)', backfaceVisibility : 'hidden', transform : 'translateY(' + nty + 'px) translateX(' + ntx + 'px) rotateY('+ nry +'deg) rotateX('+ nrx +'deg)' }); jQuery(".huge_it_slider_").css({ transform: 'translateZ(-' + tz + 'px)', transformStyle: 'preserve-3d' }); /* Execution steps.*/ setTimeout(function () { jQuery(".huge_it_slider_").css({ transition: 'all ' + huge_it_transition_duration_ + 'ms ease-in-out', transform: 'translateZ(-' + tz + 'px) rotateX('+ wrx +'deg) rotateY('+ wry +'deg)' }); }, 20); /* After transition.*/ jQuery(".huge_it_slider_").one('webkitTransitionEnd transitionend otransitionend oTransitionEnd mstransitionend', jQuery.proxy(huge_it_after_trans)); function huge_it_after_trans() { jQuery(".huge_it_slide_bg_,.huge_it_slideshow_image_item_,.huge_it_slideshow_image_second_item_ ").css('overflow', 'hidden'); jQuery(".huge_it_slide_bg_").removeAttr('style'); jQuery(current_image_class).removeAttr('style'); jQuery(next_image_class).removeAttr('style'); jQuery(".huge_it_slider_").removeAttr('style'); // alert(current_image_class+' '+next_image_class); jQuery(current_image_class).css({'opacity' : 0, filter: 'Alpha(opacity=0)', 'z-index': 1}); jQuery(next_image_class).css({'opacity' : 1, filter: 'Alpha(opacity=100)', 'z-index' : 2}); // huge_it_change_watermark_container_(); huge_it_trans_in_progress_ = false; if (typeof event_stack_ !== 'undefined' && event_stack_.length > 0) { key = event_stack_[0].split("-"); event_stack_.shift(); huge_it_change_image_(key[0], key[1], data_, true,false); } } } function huge_it_cubeH_(current_image_class, next_image_class, direction) { /* Set to half of image width.*/ var dimension = jQuery(current_image_class).width() / 2; if (direction == 'right') { huge_it_cube_(dimension, dimension, 0, 0, 90, 0, -90, current_image_class, next_image_class, direction); } else if (direction == 'left') { huge_it_cube_(dimension, -dimension, 0, 0, -90, 0, 90, current_image_class, next_image_class, direction); } } function huge_it_cubeV_(current_image_class, next_image_class, direction) { /* Set to half of image height.*/ var dimension = jQuery(current_image_class).height() / 2; /* If next slide.*/ if (direction == 'right') { huge_it_cube_(dimension, 0, -dimension, 90, 0, -90, 0, current_image_class, next_image_class, direction); } else if (direction == 'left') { huge_it_cube_(dimension, 0, dimension, -90, 0, 90, 0, current_image_class, next_image_class, direction); } } /* For browsers that does not support transitions.*/ function huge_it_fallback_(current_image_class, next_image_class, direction) { huge_it_fade_(current_image_class, next_image_class, direction); } /* For browsers that support transitions, but not 3d transforms (only used if primary transition makes use of 3d-transforms).*/ function huge_it_fallback3d_(current_image_class, next_image_class, direction) { huge_it_sliceV_(current_image_class, next_image_class, direction); } function huge_it_none_(current_image_class, next_image_class, direction) { jQuery(current_image_class).css({'opacity' : 0, 'z-index': 1}); jQuery(next_image_class).css({'opacity' : 1, 'z-index' : 2});
/* Set active thumbnail.*/ jQuery(".huge_it_slideshow_dots_").removeClass("huge_it_slideshow_dots_active_").addClass("huge_it_slideshow_dots_deactive_"); jQuery("#huge_it_dots_" + huge_it_current_key_ + "_").removeClass("huge_it_slideshow_dots_deactive_").addClass("huge_it_slideshow_dots_active_"); } function huge_it_fade_(current_image_class, next_image_class, direction) { if (huge_it_testBrowser_cssTransitions_()) {
jQuery(next_image_class).css('transition', 'opacity ' + huge_it_transition_duration_ + 'ms linear'); jQuery(current_image_class).css('transition', 'opacity ' + huge_it_transition_duration_ + 'ms linear'); jQuery(current_image_class).css({'opacity' : 0, 'z-index': 1}); jQuery(next_image_class).css({'opacity' : 1, 'z-index' : 2}); } else {
jQuery(current_image_class).animate({'opacity' : 0, 'z-index' : 1}, huge_it_transition_duration_); jQuery(next_image_class).animate({ 'opacity' : 1, 'z-index': 2 }, { duration: huge_it_transition_duration_, complete: function () {return false;} }); // For IE. jQuery(current_image_class).fadeTo(huge_it_transition_duration_, 0); jQuery(next_image_class).fadeTo(huge_it_transition_duration_, 1); }
jQuery(".huge_it_slideshow_dots_").removeClass("huge_it_slideshow_dots_active_").addClass("huge_it_slideshow_dots_deactive_"); jQuery("#huge_it_dots_" + huge_it_current_key_ + "_").removeClass("huge_it_slideshow_dots_deactive_").addClass("huge_it_slideshow_dots_active_"); } function huge_it_grid_(cols, rows, ro, tx, ty, sc, op, current_image_class, next_image_class, direction) { /* If browser does not support CSS transitions.*/ if (!huge_it_testBrowser_cssTransitions_()) { jQuery(".huge_it_slideshow_dots_").removeClass("huge_it_slideshow_dots_active_").addClass("huge_it_slideshow_dots_deactive_"); jQuery("#huge_it_dots_" + huge_it_current_key_ + "_").removeClass("huge_it_slideshow_dots_deactive_").addClass("huge_it_slideshow_dots_active_"); return huge_it_fallback_(current_image_class, next_image_class, direction);
} huge_it_trans_in_progress_ = true; /* Set active thumbnail.*/ jQuery(".huge_it_slideshow_dots_").removeClass("huge_it_slideshow_dots_active_").addClass("huge_it_slideshow_dots_deactive_"); jQuery("#huge_it_dots_" + huge_it_current_key_ + "_").removeClass("huge_it_slideshow_dots_deactive_").addClass("huge_it_slideshow_dots_active_"); /* The time (in ms) added to/subtracted from the delay total for each new gridlet.*/ var count = (huge_it_transition_duration_) / (cols + rows); /* Gridlet creator (divisions of the image grid, positioned with background-images to replicate the look of an entire slide image when assembled)*/ function huge_it_gridlet(width, height, top, img_top, left, img_left, src, imgWidth, imgHeight, c, r) { var delay = (c + r) * count; /* Return a gridlet elem with styles for specific transition.*/ return jQuery('
').css({ width : width, height : height, top : top, left : left, backgroundImage : 'url("' + src + '")', backgroundColor: jQuery(".huge_it_slideshow_image_wrap_").css("background-color"), /*backgroundColor: rgba(0, 0, 0, 0),*/ backgroundRepeat: 'no-repeat', backgroundPosition : img_left + 'px ' + img_top + 'px', backgroundSize : imgWidth + 'px ' + imgHeight + 'px', transition : 'all ' + huge_it_transition_duration_ + 'ms ease-in-out ' + delay + 'ms', transform : 'none' }); } /* Get the current slide's image.*/ var cur_img = jQuery(current_image_class).find('img'); /* Create a grid to hold the gridlets.*/ var grid = jQuery(' ').addClass('huge_it_grid_'); /* Prepend the grid to the next slide (i.e. so it's above the slide image).*/ jQuery(current_image_class).prepend(grid); /* vars to calculate positioning/size of gridlets*/ var cont = jQuery(".huge_it_slide_bg_"); var imgWidth = cur_img.width(); var imgHeight = cur_img.height(); var contWidth = cont.width(), contHeight = cont.height(), imgSrc = cur_img.attr('src'),/*.replace('/thumb', ''),*/ colWidth = Math.floor(contWidth / cols), rowHeight = Math.floor(contHeight / rows), colRemainder = contWidth - (cols * colWidth), colAdd = Math.ceil(colRemainder / cols), rowRemainder = contHeight - (rows * rowHeight), rowAdd = Math.ceil(rowRemainder / rows), leftDist = 0, img_leftDist = (jQuery(".huge_it_slide_bg_").width() - cur_img.width()) / 2; /* tx/ty args can be passed as 'auto'/'min-auto' (meaning use slide width/height or negative slide width/height).*/ tx = tx === 'auto' ? contWidth : tx; tx = tx === 'min-auto' ? - contWidth : tx; ty = ty === 'auto' ? contHeight : ty; ty = ty === 'min-auto' ? - contHeight : ty; /* Loop through cols*/ for (var i = 0; i < cols; i++) { var topDist = 0, img_topDst = (jQuery(".huge_it_slide_bg_").height() - cur_img.height()) / 2, newColWidth = colWidth; /* If imgWidth (px) does not divide cleanly into the specified number of cols, adjust individual col widths to create correct total.*/ if (colRemainder > 0) { var add = colRemainder >= colAdd ? colAdd : colRemainder; newColWidth += add; colRemainder -= add; } /* Nested loop to create row gridlets for each col.*/ for (var j = 0; j < rows; j++) { var newRowHeight = rowHeight, newRowRemainder = rowRemainder; /* If contHeight (px) does not divide cleanly into the specified number of rows, adjust individual row heights to create correct total.*/ if (newRowRemainder > 0) { add = newRowRemainder >= rowAdd ? rowAdd : rowRemainder; newRowHeight += add; newRowRemainder -= add; } /* Create & append gridlet to grid.*/ grid.append(huge_it_gridlet(newColWidth, newRowHeight, topDist, img_topDst, leftDist, img_leftDist, imgSrc, imgWidth, imgHeight, i, j)); topDist += newRowHeight; img_topDst -= newRowHeight; } img_leftDist -= newColWidth; leftDist += newColWidth; } /* Set event listener on last gridlet to finish transitioning.*/ var last_gridlet = grid.children().last(); /* Show grid & hide the image it replaces.*/ grid.show(); cur_img.css('opacity', 0); /* Add identifying classes to corner gridlets (useful if applying border radius).*/ grid.children().first().addClass('rs-top-left'); grid.children().last().addClass('rs-bottom-right'); grid.children().eq(rows - 1).addClass('rs-bottom-left'); grid.children().eq(- rows).addClass('rs-top-right'); /* Execution steps.*/ setTimeout(function () { grid.children().css({ opacity: op, transform: 'rotate('+ ro +'deg) translateX('+ tx +'px) translateY('+ ty +'px) scale('+ sc +')' }); }, 1); jQuery(next_image_class).css('opacity', 1); /* After transition.*/ jQuery(last_gridlet).one('webkitTransitionEnd transitionend otransitionend oTransitionEnd mstransitionend', jQuery.proxy(huge_it_after_trans)); function huge_it_after_trans() { jQuery(current_image_class).css({'opacity' : 0, 'z-index': 1}); jQuery(next_image_class).css({'opacity' : 1, 'z-index' : 2}); cur_img.css('opacity', 1); grid.remove(); huge_it_trans_in_progress_ = false; if (typeof event_stack_ !== 'undefined' && event_stack_.length > 0) { key = event_stack_[0].split("-"); event_stack_.shift(); huge_it_change_image_(key[0], key[1], data_, true,false); } } } function huge_it_sliceH_(current_image_class, next_image_class, direction) { if (direction == 'right') { var translateX = 'min-auto'; } else if (direction == 'left') { var translateX = 'auto'; } huge_it_grid_(1, 8, 0, translateX, 0, 1, 0, current_image_class, next_image_class, direction); } function huge_it_sliceV_(current_image_class, next_image_class, direction) { if (direction == 'right') { var translateY = 'min-auto'; } else if (direction == 'left') { var translateY = 'auto'; } huge_it_grid_(10, 1, 0, 0, translateY, 1, 0, current_image_class, next_image_class, direction); } function huge_it_slideV_(current_image_class, next_image_class, direction) { if (direction == 'right') { var translateY = 'auto'; } else if (direction == 'left') { var translateY = 'min-auto'; } huge_it_grid_(1, 1, 0, 0, translateY, 1, 1, current_image_class, next_image_class, direction); } function huge_it_slideH_(current_image_class, next_image_class, direction) { if (direction == 'right') { var translateX = 'min-auto'; } else if (direction == 'left') { var translateX = 'auto'; } huge_it_grid_(1, 1, 0, translateX, 0, 1, 1, current_image_class, next_image_class, direction); } function huge_it_scaleOut_(current_image_class, next_image_class, direction) { huge_it_grid_(1, 1, 0, 0, 0, 1.5, 0, current_image_class, next_image_class, direction); } function huge_it_scaleIn_(current_image_class, next_image_class, direction) { huge_it_grid_(1, 1, 0, 0, 0, 0.5, 0, current_image_class, next_image_class, direction); } function huge_it_blockScale_(current_image_class, next_image_class, direction) { huge_it_grid_(8, 6, 0, 0, 0, .6, 0, current_image_class, next_image_class, direction); } function huge_it_kaleidoscope_(current_image_class, next_image_class, direction) { huge_it_grid_(10, 8, 0, 0, 0, 1, 0, current_image_class, next_image_class, direction); } function huge_it_fan_(current_image_class, next_image_class, direction) { if (direction == 'right') { var rotate = 45; var translateX = 100; } else if (direction == 'left') { var rotate = -45; var translateX = -100; } huge_it_grid_(1, 10, rotate, translateX, 0, 1, 0, current_image_class, next_image_class, direction); } function huge_it_blindV_(current_image_class, next_image_class, direction) { huge_it_grid_(1, 8, 0, 0, 0, .7, 0, current_image_class, next_image_class); } function huge_it_blindH_(current_image_class, next_image_class, direction) { huge_it_grid_(10, 1, 0, 0, 0, .7, 0, current_image_class, next_image_class); } function huge_it_random_(current_image_class, next_image_class, direction) { var anims = ['sliceH', 'sliceV', 'slideH', 'slideV', 'scaleOut', 'scaleIn', 'blockScale', 'kaleidoscope', 'fan', 'blindH', 'blindV']; /* Pick a random transition from the anims array.*/ this["huge_it_" + anims[Math.floor(Math.random() * anims.length)] + "_"](current_image_class, next_image_class, direction); }function iterator_() { return 1; }
function huge_it_change_image_(current_key, key, data_, from_effect, clicked) {
if (data_[key]) {
if (!from_effect) { // Change image key. jQuery("#huge_it_current_image_key_").val(key); current_key = jQuery(".huge_it_slideshow_dots_active_").attr("data-image_key"); }
if (huge_it_trans_in_progress_) { event_stack_.push(current_key + '-' + key); return; }
var direction = 'right'; if (huge_it_current_key_ > key) { direction = 'left'; } else if (huge_it_current_key_ == key) { return false; }
// Set active thumbnail position.
huge_it_current_key_ = key; jQuery("#huge_it_slideshow_image_").attr('data-image_id', data_[key]["id"]);
jQuery(".huge_it_slideshow_title_text_").html(data_[key]["alt"]); jQuery(".huge_it_slideshow_description_text_").html(data_[key]["description"]);
var current_image_class = "#image_id__" + data_[current_key]["id"]; var next_image_class = "#image_id__" + data_[key]["id"];
if (jQuery(current_image_class).find('.huge_it_video_frame_').length > 0) { var streffect = ''; if (streffect == "cubeV" || streffect == "cubeH" || streffect == "none" || streffect == "fade") { huge_it__(current_image_class, next_image_class, direction); } else { huge_it_fade_(current_image_class, next_image_class, direction); } } else { huge_it__(current_image_class, next_image_class, direction); }
jQuery('.huge_it_slideshow_title_text_').removeClass('none'); if (jQuery('.huge_it_slideshow_title_text_').html() == "") { jQuery('.huge_it_slideshow_title_text_').addClass('none'); }
jQuery('.huge_it_slideshow_description_text_').removeClass('none'); if (jQuery('.huge_it_slideshow_description_text_').html() == "") { jQuery('.huge_it_slideshow_description_text_').addClass('none'); }
jQuery(current_image_class).find('.huge_it_slideshow_title_text_').addClass('none');
jQuery(current_image_class).find('.huge_it_slideshow_description_text_').addClass('none');
huge_it_move_dots_();
/***
} if ((jQuery('#player__' + key)).hasClass('huge-it-iframe-vimeo') && ('' == 'on')) { jQuery('#player__' + key).vimeo('play'); } /*** ***/ window.clearInterval(huge_interval['huge_it_playInterval_' +]); play_(); }
} var staticthumbWidth; jQuery(window).load(function() { staticthumbWidth = jQuery('#huge_it_thumb_slider>li').width();
}); function huge_it_popup_resize_() {
var staticsliderwidth =; var sliderwidth =; var bodyWidth = jQuery(window).width(); var parentWidth = jQuery(".huge_it_slideshow_image_wrap_").parent().width();
if (sliderwidth > parentWidth) { sliderwidth = parentWidth; } if (sliderwidth > bodyWidth) { sliderwidth = bodyWidth; } var str=/(staticsliderwidth); var str2 =100/; var sliderDynamicImageHeight = sliderwidth*str; var sliderDynamicThumbHeight = 0;
jQuery('.huge_it_slideshow_image_wrap_').css({'max-height':sliderDynamicImageHeight+sliderDynamicThumbHeight}); jQuery('.huge_it_slideshow_image_wrap1_').css({'max-height':sliderDynamicImageHeight}); jQuery('.huge_it_slideshow_thumbs_ li').css({'max-height':sliderDynamicThumbHeight});
jQuery("#huge_it_loading_image_").css({display: "none"}); jQuery(".huge_it_slideshow_image_wrap1_").css({opacity: 1}); jQuery(".huge_it_slideshow_image_wrap_").removeClass("nocolor");
if ("resize"=="crop"){ jQuery(".huge_it_slider_ul li img").each(function(){ if(jQuery(this).prop('naturalWidth')>jQuery(this).prop('naturalHeight')) jQuery(this).css({'width':'100%','height':'auto'/*,'top':'50%','left':'50%','transform':'translate( -50%, -50% )'*/}); else{ jQuery(this).css({'height':'100%','width':'auto'/*,'top':'50%','left':'50%','transform':'translate( -50%, -50% )'*/}); } }); } }
jQuery(window).load(function () { jQuery(window).resize(function() { huge_it_popup_resize_(); });
jQuery('#huge_it_slideshow_left_').on('click',function(){ huge_it_change_image_(parseInt(jQuery('#huge_it_current_image_key_').val()), (parseInt(jQuery('#huge_it_current_image_key_').val()) - iterator_()) >= 0 ? (parseInt(jQuery('#huge_it_current_image_key_').val()) - iterator_()) % data_.length : data_.length - 1, data_,false,true); return false; });
jQuery('#huge_it_slideshow_right_').on('click',function(){ huge_it_change_image_(parseInt(jQuery('#huge_it_current_image_key_').val()), (parseInt(jQuery('#huge_it_current_image_key_').val()) + iterator_()) % data_.length, data_,false,true); return false; });
huge_it_popup_resize_(); /* Disable right click.*/ jQuery('div[id^="huge_it_container"]').bind("contextmenu", function () { return false; });
/*HOVER SLIDESHOW*/ jQuery("#huge_it_slideshow_image_container_, .huge_it_slideshow_image_container_, .huge_it_slideshow_dots_container_,#huge_it_slideshow_right_,#huge_it_slideshow_left_").hover(function(){ jQuery("#huge_it_slideshow_right_").css({'display':'inline'}); jQuery("#huge_it_slideshow_left_").css({'display':'inline'}); },function(){ jQuery("#huge_it_slideshow_right_").css({'display':'none'}); jQuery("#huge_it_slideshow_left_").css({'display':'none'}); });
if(pausehover=="on" && !/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)){ jQuery("#huge_it_slideshow_image_container_, .huge_it_slideshow_image_container_").hover(function(){ window.clearInterval(huge_interval['huge_it_playInterval_'+]); scrolling = false; },function(){ window.clearInterval(huge_interval['huge_it_playInterval_'+]); scrolling = true; play_(); }); } play_(); }); function play_(){ if(scrolling ){ huge_interval['huge_it_playInterval_'+] = setInterval(function () { var iterator = 1; huge_it_change_image_(parseInt(jQuery('#huge_it_current_image_key_').val()), (parseInt(jQuery('#huge_it_current_image_key_').val()) + iterator) % data_.length, data_,false,false); }, '0'); } } jQuery(window).focus(function() { var i_ = 0; jQuery(".huge_it_slider_").children("div").each(function () { if (jQuery(this).css('opacity') == 1) { jQuery("#huge_it_current_image_key_").val(i_); } i_++; }); }); jQuery(window).blur(function() { console.log(event_stack_); window.clearInterval(huge_interval['huge_it_playInterval_'+]); }); jQuery(window).focus(function() { play_() });