var data_7 = [];
var event_stack_7 = [];
video_is_playing_7=false;
data_7["0"]=[];data_7["0"]["id"]="0";data_7["0"]["image_url"]="http://lacavesimsonhotel.com/wp-content/uploads/2015/12/securite.detecteur.metaux.jpg";data_7["0"]["description"]=" Vigile et détecteur de métaux.";data_7["0"]["alt"]="Sécurité ";data_7["1"]=[];data_7["1"]["id"]="1";data_7["1"]["image_url"]="http://lacavesimsonhotel.com/wp-content/uploads/2015/12/porte-magnétique2.jpg";data_7["1"]["description"]=" Porte magnétique";data_7["1"]["alt"]="Sécurité";data_7["2"]=[];data_7["2"]["id"]="2";data_7["2"]["image_url"]="http://lacavesimsonhotel.com/wp-content/uploads/2015/12/securite-incendie.jpg";data_7["2"]["description"]="";data_7["2"]["alt"]="Sécurité";data_7["3"]=[];data_7["3"]["id"]="3";data_7["3"]["image_url"]="http://lacavesimsonhotel.com/wp-content/uploads/2015/12/alarme-incendie.jpg";data_7["3"]["description"]="Alarme incendie";data_7["3"]["alt"]="";data_7["4"]=[];data_7["4"]["id"]="4";data_7["4"]["image_url"]="http://lacavesimsonhotel.com/wp-content/uploads/2015/12/detecteur-fumé.jpg";data_7["4"]["description"]="Détecteur de fumé";data_7["4"]["alt"]="";data_7["5"]=[];data_7["5"]["id"]="5";data_7["5"]["image_url"]="http://lacavesimsonhotel.com/wp-content/uploads/2015/12/camera-et-wifi.jpg";data_7["5"]["description"]="Camera de surveillance, wifi";data_7["5"]["alt"]="";data_7["6"]=[];data_7["6"]["id"]="6";data_7["6"]["image_url"]="http://lacavesimsonhotel.com/wp-content/uploads/2015/12/100_1065.jpg";data_7["6"]["description"]="Camera de surveillance, wifi";data_7["6"]["alt"]="";
var huge_it_trans_in_progress_7 = false;
var huge_it_transition_duration_7 = 1000;
var huge_it_playInterval_7;
// Stop autoplay.
window.clearInterval(huge_it_playInterval_7);
var huge_it_current_key_7 = '';
function huge_it_move_dots_7() {
var image_left = jQuery(".huge_it_slideshow_dots_active_7").position().left;
var image_right = jQuery(".huge_it_slideshow_dots_active_7").position().left + jQuery(".huge_it_slideshow_dots_active_7").outerWidth(true);
}
function huge_it_testBrowser_cssTransitions_7() {
return huge_it_testDom_7('Transition');
}
function huge_it_testBrowser_cssTransforms3d_7() {
return huge_it_testDom_7('Perspective');
}
function huge_it_testDom_7(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_7(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_7()) {
jQuery(".huge_it_slideshow_dots_7").removeClass("huge_it_slideshow_dots_active_7").addClass("huge_it_slideshow_dots_deactive_7");
jQuery("#huge_it_dots_" + huge_it_current_key_7 + "_7").removeClass("huge_it_slideshow_dots_deactive_7").addClass("huge_it_slideshow_dots_active_7");
return huge_it_fallback_7(current_image_class, next_image_class, direction);
}
if (!huge_it_testBrowser_cssTransforms3d_7()) {
return huge_it_fallback3d_7(current_image_class, next_image_class, direction);
}
//alert(current_image_class+' '+next_image_class);
jQuery(current_image_class).css({'z-index': 'none'});
jQuery(next_image_class).css({'z-index' : 2});
huge_it_trans_in_progress_7 = true;
/* Set active thumbnail.*/
jQuery(".huge_it_slideshow_dots_7").removeClass("huge_it_slideshow_dots_active_7").addClass("huge_it_slideshow_dots_deactive_7");
jQuery("#huge_it_dots_" + huge_it_current_key_7 + "_7").removeClass("huge_it_slideshow_dots_deactive_7").addClass("huge_it_slideshow_dots_active_7");
jQuery(".huge_it_slide_bg_7").css('perspective', 1000);
jQuery(current_image_class).css({
transform : 'translateZ(' + tz + 'px)',
backfaceVisibility : 'hidden'
});
jQuery(".huge_it_slideshow_image_wrap_7,.huge_it_slide_bg_7,.huge_it_slideshow_image_item_7,.huge_it_slideshow_image_second_item_7 ").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_7").css({
transform: 'translateZ(-' + tz + 'px)',
transformStyle: 'preserve-3d'
});
/* Execution steps.*/
setTimeout(function () {
jQuery(".huge_it_slider_7").css({
transition: 'all ' + huge_it_transition_duration_7 + 'ms ease-in-out',
transform: 'translateZ(-' + tz + 'px) rotateX('+ wrx +'deg) rotateY('+ wry +'deg)'
});
}, 20);
/* After transition.*/
jQuery(".huge_it_slider_7").one('webkitTransitionEnd transitionend otransitionend oTransitionEnd mstransitionend', jQuery.proxy(huge_it_after_trans));
function huge_it_after_trans() {
/*if (huge_it_from_focus_7) {
huge_it_from_focus_7 = false;
return;
}*/
jQuery(".huge_it_slide_bg_7,.huge_it_slideshow_image_item_7,.huge_it_slideshow_image_second_item_7 ").css('overflow', 'hidden');
jQuery(".huge_it_slide_bg_7").removeAttr('style');
jQuery(current_image_class).removeAttr('style');
jQuery(next_image_class).removeAttr('style');
jQuery(".huge_it_slider_7").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_7();
huge_it_trans_in_progress_7 = false;
if (typeof event_stack_7 !== 'undefined' && event_stack_7.length > 0) {
key = event_stack_7[0].split("-");
event_stack_7.shift();
huge_it_change_image_7(key[0], key[1], data_7, true,false);
}
}
}
function huge_it_cubeH_7(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_7(dimension, dimension, 0, 0, 90, 0, -90, current_image_class, next_image_class, direction);
}
else if (direction == 'left') {
huge_it_cube_7(dimension, -dimension, 0, 0, -90, 0, 90, current_image_class, next_image_class, direction);
}
}
function huge_it_cubeV_7(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_7(dimension, 0, -dimension, 90, 0, -90, 0, current_image_class, next_image_class, direction);
}
else if (direction == 'left') {
huge_it_cube_7(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_7(current_image_class, next_image_class, direction) {
huge_it_fade_7(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_7(current_image_class, next_image_class, direction) {
huge_it_sliceV_7(current_image_class, next_image_class, direction);
}
function huge_it_none_7(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_7").removeClass("huge_it_slideshow_dots_active_7").addClass("huge_it_slideshow_dots_deactive_7");
jQuery("#huge_it_dots_" + huge_it_current_key_7 + "_7").removeClass("huge_it_slideshow_dots_deactive_7").addClass("huge_it_slideshow_dots_active_7");
}
function huge_it_fade_7(current_image_class, next_image_class, direction) {
if (huge_it_testBrowser_cssTransitions_7()) {
jQuery(next_image_class).css('transition', 'opacity ' + huge_it_transition_duration_7 + 'ms linear');
jQuery(current_image_class).css('transition', 'opacity ' + huge_it_transition_duration_7 + '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_7);
jQuery(next_image_class).animate({
'opacity' : 1,
'z-index': 2
}, {
duration: huge_it_transition_duration_7,
complete: function () {return false;}
});
// For IE.
jQuery(current_image_class).fadeTo(huge_it_transition_duration_7, 0);
jQuery(next_image_class).fadeTo(huge_it_transition_duration_7, 1);
}
jQuery(".huge_it_slideshow_dots_7").removeClass("huge_it_slideshow_dots_active_7").addClass("huge_it_slideshow_dots_deactive_7");
jQuery("#huge_it_dots_" + huge_it_current_key_7 + "_7").removeClass("huge_it_slideshow_dots_deactive_7").addClass("huge_it_slideshow_dots_active_7");
}
function huge_it_grid_7(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_7()) {
jQuery(".huge_it_slideshow_dots_7").removeClass("huge_it_slideshow_dots_active_7").addClass("huge_it_slideshow_dots_deactive_7");
jQuery("#huge_it_dots_" + huge_it_current_key_7 + "_7").removeClass("huge_it_slideshow_dots_deactive_7").addClass("huge_it_slideshow_dots_active_7");
return huge_it_fallback_7(current_image_class, next_image_class, direction);
}
huge_it_trans_in_progress_7 = true;
/* Set active thumbnail.*/
jQuery(".huge_it_slideshow_dots_7").removeClass("huge_it_slideshow_dots_active_7").addClass("huge_it_slideshow_dots_deactive_7");
jQuery("#huge_it_dots_" + huge_it_current_key_7 + "_7").removeClass("huge_it_slideshow_dots_deactive_7").addClass("huge_it_slideshow_dots_active_7");
/* The time (in ms) added to/subtracted from the delay total for each new gridlet.*/
var count = (huge_it_transition_duration_7) / (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_7").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_7 + '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_7');
/* 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_7");
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_7").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 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 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_7 = false;
if (typeof event_stack_7 !== 'undefined' && event_stack_7.length > 0) {
key = event_stack_7[0].split("-");
event_stack_7.shift();
huge_it_change_image_7(key[0], key[1], data_7, true,false);
}
}
}
function huge_it_sliceH_7(current_image_class, next_image_class, direction) {
if (direction == 'right') {
var translateX = 'min-auto';
}
else if (direction == 'left') {
var translateX = 'auto';
}
huge_it_grid_7(1, 8, 0, translateX, 0, 1, 0, current_image_class, next_image_class, direction);
}
function huge_it_sliceV_7(current_image_class, next_image_class, direction) {
if (direction == 'right') {
var translateY = 'min-auto';
}
else if (direction == 'left') {
var translateY = 'auto';
}
huge_it_grid_7(10, 1, 0, 0, translateY, 1, 0, current_image_class, next_image_class, direction);
}
function huge_it_slideV_7(current_image_class, next_image_class, direction) {
if (direction == 'right') {
var translateY = 'auto';
}
else if (direction == 'left') {
var translateY = 'min-auto';
}
huge_it_grid_7(1, 1, 0, 0, translateY, 1, 1, current_image_class, next_image_class, direction);
}
function huge_it_slideH_7(current_image_class, next_image_class, direction) {
if (direction == 'right') {
var translateX = 'min-auto';
}
else if (direction == 'left') {
var translateX = 'auto';
}
huge_it_grid_7(1, 1, 0, translateX, 0, 1, 1, current_image_class, next_image_class, direction);
}
function huge_it_scaleOut_7(current_image_class, next_image_class, direction) {
huge_it_grid_7(1, 1, 0, 0, 0, 1.5, 0, current_image_class, next_image_class, direction);
}
function huge_it_scaleIn_7(current_image_class, next_image_class, direction) {
huge_it_grid_7(1, 1, 0, 0, 0, 0.5, 0, current_image_class, next_image_class, direction);
}
function huge_it_blockScale_7(current_image_class, next_image_class, direction) {
huge_it_grid_7(8, 6, 0, 0, 0, .6, 0, current_image_class, next_image_class, direction);
}
function huge_it_kaleidoscope_7(current_image_class, next_image_class, direction) {
huge_it_grid_7(10, 8, 0, 0, 0, 1, 0, current_image_class, next_image_class, direction);
}
function huge_it_fan_7(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_7(1, 10, rotate, translateX, 0, 1, 0, current_image_class, next_image_class, direction);
}
function huge_it_blindV_7(current_image_class, next_image_class, direction) {
huge_it_grid_7(1, 8, 0, 0, 0, .7, 0, current_image_class, next_image_class);
}
function huge_it_blindH_7(current_image_class, next_image_class, direction) {
huge_it_grid_7(10, 1, 0, 0, 0, .7, 0, current_image_class, next_image_class);
}
function huge_it_random_7(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)] + "_7"](current_image_class, next_image_class, direction);
}
function iterator_7() {
var iterator = 1;
return iterator;
}
function huge_it_change_image_7(current_key, key, data_7, from_effect,clicked) {
if (data_7[key]) {
if(video_is_playing_7 && !clicked){
return false;
}
if (!from_effect) {
// Change image key.
jQuery("#huge_it_current_image_key_7").val(key);
// if (current_key == '-2') { /* Dots.*/
current_key = jQuery(".huge_it_slideshow_dots_active_7").attr("data-image_key");
// }
}
if (huge_it_trans_in_progress_7) {
//errorlogjQuery(".huge_it_slideshow_image_wrap_7").after(" --IN TRANSACTION-- "); event_stack_7.push(current_key + '-' + key); return; } var direction = 'right'; if (huge_it_current_key_7 > key) { var direction = 'left'; } else if (huge_it_current_key_7 == key) { return false; } // Set active thumbnail position. huge_it_current_key_7 = key; //Change image id, title, description. jQuery("#huge_it_slideshow_image_7").attr('data-image_id', data_7[key]["id"]); jQuery(".huge_it_slideshow_title_text_7").html(data_7[key]["alt"]); jQuery(".huge_it_slideshow_description_text_7").html(data_7[key]["description"]); var current_image_class = "#image_id_7_" + data_7[current_key]["id"]; var next_image_class = "#image_id_7_" + data_7[key]["id"]; if(jQuery(current_image_class).find('.huge_it_video_frame_7').length>0) { var streffect='random'; if(streffect=="cubeV" || streffect=="cubeH" || streffect=="none" || streffect=="fade"){ huge_it_random_7(current_image_class, next_image_class, direction); }else{ huge_it_fade_7(current_image_class, next_image_class, direction); } }else{ huge_it_random_7(current_image_class, next_image_class, direction); } jQuery('.huge_it_slideshow_title_text_7').removeClass('none'); if(jQuery('.huge_it_slideshow_title_text_7').html()==""){jQuery('.huge_it_slideshow_title_text_7').addClass('none');} jQuery('.huge_it_slideshow_description_text_7').removeClass('none'); if(jQuery('.huge_it_slideshow_description_text_7').html()==""){jQuery('.huge_it_slideshow_description_text_7').addClass('none');} jQuery(current_image_class).find('.huge_it_slideshow_title_text_7').addClass('none'); jQuery(current_image_class).find('.huge_it_slideshow_description_text_7').addClass('none'); //errorlogjQuery(".huge_it_slideshow_image_wrap_7").after("--cur-key="+current_key+" --cur-img-class="+current_image_class+" nxt-img-class="+next_image_class+"--"); huge_it_move_dots_7(); window.clearInterval(huge_it_playInterval_7); play_7(); } } function huge_it_popup_resize_7() { var staticsliderwidth=450; var sliderwidth=450; var bodyWidth=jQuery(window).width(); var parentWidth = jQuery(".huge_it_slideshow_image_wrap_7").parent().width(); //if responsive js late responsive.js @ take body size and not parent div if(sliderwidth>parentWidth){sliderwidth=parentWidth;} if(sliderwidth>bodyWidth){sliderwidth=bodyWidth;} var str=(350/staticsliderwidth); jQuery(".huge_it_slideshow_image_wrap_7").css({width: (sliderwidth)}); jQuery(".huge_it_slideshow_image_wrap_7").css({height: ((sliderwidth) * str)}); jQuery(".huge_it_slideshow_image_container_7").css({width: (sliderwidth)}); jQuery(".huge_it_slideshow_image_container_7").css({height: ((sliderwidth) * str)}); if("top"=="middle"){var titlemargintopminus=jQuery(".huge_it_slideshow_title_text_7").outerHeight()/2;} if("right"=="center"){var titlemarginleftminus=jQuery(".huge_it_slideshow_title_text_7").outerWidth()/2;} jQuery(".huge_it_slideshow_title_text_7").css({cssText: "margin-top:-" + titlemargintopminus + "px; margin-left:-"+titlemarginleftminus+"px;"}); if("bottom"=="middle"){var descriptionmargintopminus=jQuery(".huge_it_slideshow_description_text_7").outerHeight()/2;} if("right"=="center"){var descriptionmarginleftminus=jQuery(".huge_it_slideshow_description_text_7").outerWidth()/2;} jQuery(".huge_it_slideshow_description_text_7").css({cssText: "margin-top:-" + descriptionmargintopminus + "px; margin-left:-"+descriptionmarginleftminus+"px;"}); jQuery("#huge_it_loading_image_7").css({display: "none"}); jQuery(".huge_it_slideshow_image_wrap1_7").css({display: "block"}); jQuery(".huge_it_slideshow_image_wrap_7").removeClass("nocolor"); if("resize"=="resize"){ jQuery(".huge_it_slideshow_image_7, .huge_it_slideshow_image_container_7 img").css({ cssText: "width:" + sliderwidth + "px; height:" + ((sliderwidth) * str) +"px;" }); }else { jQuery(".huge_it_slideshow_image_7,.huge_it_slideshow_image_item2_7").css({ cssText: "max-width: " + sliderwidth + "px !important; max-height: " + (sliderwidth * str) + "px !important;" }); } jQuery('.huge_it_video_frame_7').each(function (e) { jQuery(this).width(sliderwidth); jQuery(this).height(sliderwidth * str); }); } jQuery(window).load(function () { jQuery(window).resize(function() { huge_it_popup_resize_7(); }); jQuery('#huge_it_slideshow_left_7').on('click',function(){ huge_it_change_image_7(parseInt(jQuery('#huge_it_current_image_key_7').val()), (parseInt(jQuery('#huge_it_current_image_key_7').val()) - iterator_7()) >= 0 ? (parseInt(jQuery('#huge_it_current_image_key_7').val()) - iterator_7()) % data_7.length : data_7.length - 1, data_7,false,true); return false; }); jQuery('#huge_it_slideshow_right_7').on('click',function(){ huge_it_change_image_7(parseInt(jQuery('#huge_it_current_image_key_7').val()), (parseInt(jQuery('#huge_it_current_image_key_7').val()) + iterator_7()) % data_7.length, data_7,false,true); return false; }); huge_it_popup_resize_7(); /* Disable right click.*/ jQuery('div[id^="huge_it_container"]').bind("contextmenu", function () { return false; }); /*HOVER SLIDESHOW*/ jQuery("#huge_it_slideshow_image_container_7, .huge_it_slideshow_image_container_7, .huge_it_slideshow_dots_container_7,#huge_it_slideshow_right_7,#huge_it_slideshow_left_7").hover(function(){ //errorlogjQuery(".huge_it_slideshow_image_wrap_7").after(" -- hover -- "); jQuery("#huge_it_slideshow_right_7").css({'display':'inline'}); jQuery("#huge_it_slideshow_left_7").css({'display':'inline'}); },function(){ jQuery("#huge_it_slideshow_right_7").css({'display':'none'}); jQuery("#huge_it_slideshow_left_7").css({'display':'none'}); }); var pausehover="on"; if(pausehover=="on"){ jQuery("#huge_it_slideshow_image_container_7, .huge_it_slideshow_image_container_7, .huge_it_slideshow_dots_container_7,#huge_it_slideshow_right_7,#huge_it_slideshow_left_7").hover(function(){ window.clearInterval(huge_it_playInterval_7); },function(){ window.clearInterval(huge_it_playInterval_7); play_7(); }); } play_7(); }); function play_7() { /* Play.*/ //errorlogjQuery(".huge_it_slideshow_image_wrap_7").after(" -- paly ---- "); huge_it_playInterval_7 = setInterval(function () { //errorlogjQuery(".huge_it_slideshow_image_wrap_7").after(" -- time left ---- "); var iterator = 1; huge_it_change_image_7(parseInt(jQuery('#huge_it_current_image_key_7').val()), (parseInt(jQuery('#huge_it_current_image_key_7').val()) + iterator) % data_7.length, data_7,false,false); }, '5000'); } jQuery(window).focus(function() { /*event_stack_7 = [];*/ var i_7 = 0; jQuery(".huge_it_slider_7").children("div").each(function () { if (jQuery(this).css('opacity') == 1) { jQuery("#huge_it_current_image_key_7").val(i_7); } i_7++; }); }); jQuery(window).blur(function() { event_stack_7 = []; window.clearInterval(huge_it_playInterval_7); }); |
|