diff --git a/js/lightbox.js b/js/lightbox.js index 12b672bc7ab7800a79e7186391d5407df53c29d7..b4154c75794dba591835cfa8323b1dc3e16ce934 100644 --- a/js/lightbox.js +++ b/js/lightbox.js @@ -157,12 +157,12 @@ var Lightbox = { $('#lightshowPlay').click(function() { Lightbox.togglePlayPause("lightshowPlay", "lightshowPause"); return false; } ); // Fix positioning. - $('#prevLink, #nextLink, #framePrevLink, #frameNextLink').css({ paddingTop: Lightbox.borderSize + 'px'}); - $('#imageContainer, #frameContainer, #modalContainer').css({ padding: Lightbox.borderSize + 'px'}); - $('#outerImageContainer, #imageDataContainer, #bottomNavClose').css({backgroundColor: '#' + Lightbox.boxColor, color: '#'+Lightbox.fontColor}); + $('#prevLink, #nextLink, #framePrevLink, #frameNextLink').css({ 'paddingTop': Lightbox.borderSize + 'px'}); + $('#imageContainer, #frameContainer, #modalContainer').css({ 'padding': Lightbox.borderSize + 'px'}); + $('#outerImageContainer, #imageDataContainer, #bottomNavClose').css({'backgroundColor': '#' + Lightbox.boxColor, 'color': '#'+Lightbox.fontColor}); if (!Lightbox.iframe_border) { - $('#lightboxFrame').css({border: 'none'}); + $('#lightboxFrame').css({'border': 'none'}); $('#lightboxFrame').attr("frameborder", '0'); } @@ -230,21 +230,21 @@ var Lightbox = { // Stretch overlay to fill page and fade in. var arrayPageSize = Lightbox.getPageSize(); $("#overlay").hide().css({ - width: '100%', - zIndex: '10090', - height: arrayPageSize[1] + 'px', - backgroundColor : '#' + Lightbox.overlayColor + 'width': '100%', + 'zIndex': '10090', + 'height': arrayPageSize[1] + 'px', + 'backgroundColor' : '#' + Lightbox.overlayColor }); // Detect OS X FF2 opacity + flash issue. if (lightvideo && this.detectMacFF2()) { $("#overlay").removeClass("overlay_default"); $("#overlay").addClass("overlay_macff2"); - $("#overlay").css({opacity : null}); + $("#overlay").css({'opacity' : null}); } else { $("#overlay").removeClass("overlay_macff2"); $("#overlay").addClass("overlay_default"); - $("#overlay").css({opacity : Lightbox.overlayOpacity}); + $("#overlay").css({'opacity' : Lightbox.overlayOpacity}); } $("#overlay").fadeIn(Lightbox.fadeInSpeed); @@ -326,9 +326,9 @@ var Lightbox = { var lightboxTop = arrayPageScroll[1] + (Lightbox.topPosition == '' ? (arrayPageSize[3] / 10) : Lightbox.topPosition) * 1; var lightboxLeft = arrayPageScroll[0]; $('#lightbox').css({ - zIndex: '10500', - top: lightboxTop + 'px', - left: lightboxLeft + 'px' + 'zIndex': '10500', + 'top': lightboxTop + 'px', + 'left': lightboxLeft + 'px' }).show(); Lightbox.total = Lightbox.imageArray.length; @@ -361,7 +361,7 @@ var Lightbox = { // Hide elements during transition. - $('#loading').css({zIndex: '10500'}).show(); + $('#loading').css({'zIndex': '10500'}).show(); if (!Lightbox.alternative_layout) { $('#imageContainer').hide(); } @@ -395,7 +395,7 @@ var Lightbox = { if ((orig.w >= targ.w || orig.h >= targ.h) && orig.h && orig.w) { ratio = ((targ.w / orig.w) < (targ.h / orig.h)) ? targ.w / orig.w : targ.h / orig.h; if (!Lightbox.disableZoom && !Lightbox.isSlideshow) { - $('#bottomNavZoom').css({zIndex: '10500'}).show(); + $('#bottomNavZoom').css({'zIndex': '10500'}).show(); } } @@ -410,7 +410,7 @@ var Lightbox = { // Only display zoom out button if not a slideshow and if the // buttons aren't disabled. if (!Lightbox.disableResize && Lightbox.isSlideshow === false && !Lightbox.disableZoom) { - $('#bottomNavZoomOut').css({zIndex: '10500'}).show(); + $('#bottomNavZoomOut').css({'zIndex': '10500'}).show(); } } } @@ -497,7 +497,7 @@ var Lightbox = { } // Simultaneous. else { - $('#outerImageContainer').animate({width: widthNew, height: heightNew}, Lightbox.resizeSpeed, 'linear', function() { Lightbox.showData(); }); + $('#outerImageContainer').animate({'width': widthNew, 'height': heightNew}, Lightbox.resizeSpeed, 'linear', function() { Lightbox.showData(); }); } // If new and old image are same size and no scaling transition is necessary @@ -513,9 +513,9 @@ var Lightbox = { var s = Drupal.settings.lightbox2; if (!s.use_alt_layout) { - $('#prevLink, #nextLink').css({height: imgHeight + 'px'}); + $('#prevLink, #nextLink').css({'height': imgHeight + 'px'}); } - $('#imageDataContainer').css({width: widthNew + 'px'}); + $('#imageDataContainer').css({'width': widthNew + 'px'}); }, // showData() @@ -528,10 +528,10 @@ var Lightbox = { if (Lightbox.isLightframe) { $('#frameContainer').show(); if ($.browser.safari) { - $('#lightboxFrame').css({zIndex: '10500'}).show(); + $('#lightboxFrame').css({'zIndex': '10500'}).show(); } else { - $('#lightboxFrame').css({zIndex: '10500'}).fadeIn(Lightbox.fadeInSpeed); + $('#lightboxFrame').css({'zIndex': '10500'}).fadeIn(Lightbox.fadeInSpeed); } try { document.getElementById("lightboxFrame").src = Lightbox.imageArray[Lightbox.activeImage][0]; @@ -546,7 +546,7 @@ var Lightbox = { $("#modalContainer").load(Lightbox.imageArray[Lightbox.activeImage][0]); $('#modalContainer').unbind('click'); } - $('#modalContainer').css({zIndex: '10500'}).show(); + $('#modalContainer').css({'zIndex': '10500'}).show(); } } @@ -554,10 +554,10 @@ var Lightbox = { else { $('#imageContainer').show(); if($.browser.safari) { - $('#lightboxImage').css({zIndex: '10500'}).show(); + $('#lightboxImage').css({'zIndex': '10500'}).show(); } else { - $('#lightboxImage').css({zIndex: '10500'}).fadeIn(Lightbox.fadeInSpeed); + $('#lightboxImage').css({'zIndex': '10500'}).fadeIn(Lightbox.fadeInSpeed); } Lightbox.updateDetails(); this.preloadNeighborImages(); @@ -594,7 +594,7 @@ var Lightbox = { var lightboxTop = (Lightbox.topPosition == '' ? (arrayPageSize[3] / 10) : Lightbox.topPosition) * 1; pageHeight = pageHeight + arrayPageScroll[1] + lightboxTop; } - $('#overlay').css({height: pageHeight + 'px', width: arrayPageSize[0] + 'px'}); + $('#overlay').css({'height': pageHeight + 'px', 'width': arrayPageSize[0] + 'px'}); // Gecko browsers (e.g. Firefox, SeaMonkey, etc) don't handle pdfs as // expected. @@ -615,7 +615,7 @@ var Lightbox = { var caption = Lightbox.imageArray[Lightbox.activeImage][1]; if (!caption) caption = ' '; - $('#caption').html(caption).css({zIndex: '10500'}).show(); + $('#caption').html(caption).css({'zIndex': '10500'}).show(); // If image is part of set display 'Image x of x'. var s = Drupal.settings.lightbox2; @@ -628,12 +628,12 @@ var Lightbox = { else { numberDisplay = s.page_count.replace(/\!current/, currentImage).replace(/\!total/, Lightbox.total); } - $('#numberDisplay').html(numberDisplay).css({zIndex: '10500'}).show(); + $('#numberDisplay').html(numberDisplay).css({'zIndex': '10500'}).show(); } $("#imageDataContainer").hide().slideDown(Lightbox.slideDownSpeed); if (Lightbox.rtl == 1) { - $("#bottomNav").css({float: 'left'}); + $("#bottomNav").css({'float': 'left'}); } Lightbox.updateNav(); }, @@ -642,14 +642,14 @@ var Lightbox = { // Display appropriate previous and next hover navigation. updateNav: function() { - $('#hoverNav').css({zIndex: '10500'}).show(); + $('#hoverNav').css({'zIndex': '10500'}).show(); var prevLink = '#prevLink'; var nextLink = '#nextLink'; // Slideshow is separated as we need to show play / pause button. if (Lightbox.isSlideshow) { if ((Lightbox.total > 1 && Lightbox.loopSlides) || Lightbox.activeImage !== 0) { - $(prevLink).css({zIndex: '10500'}).show().click(function() { + $(prevLink).css({'zIndex': '10500'}).show().click(function() { if (Lightbox.pauseOnPrevClick) { Lightbox.togglePlayPause("lightshowPause", "lightshowPlay"); } @@ -662,7 +662,7 @@ var Lightbox = { // If not last image in set, display next image button. if ((Lightbox.total > 1 && Lightbox.loopSlides) || Lightbox.activeImage != (Lightbox.total - 1)) { - $(nextLink).css({zIndex: '10500'}).show().click(function() { + $(nextLink).css({'zIndex': '10500'}).show().click(function() { if (Lightbox.pauseOnNextClick) { Lightbox.togglePlayPause("lightshowPause", "lightshowPlay"); } @@ -679,15 +679,15 @@ var Lightbox = { else { if (Lightbox.isLightframe && !Lightbox.alternative_layout) { - $('#frameHoverNav').css({zIndex: '10500'}).show(); - $('#hoverNav').css({zIndex: '10500'}).hide(); + $('#frameHoverNav').css({'zIndex': '10500'}).show(); + $('#hoverNav').css({'zIndex': '10500'}).hide(); prevLink = '#framePrevLink'; nextLink = '#frameNextLink'; } // If not first image in set, display prev image button. if ((Lightbox.total > 1 && Lightbox.loopItems) || Lightbox.activeImage !== 0) { - $(prevLink).css({zIndex: '10500'}).show().click(function() { + $(prevLink).css({'zIndex': '10500'}).show().click(function() { Lightbox.changeData(Lightbox.activeImage - 1); return false; }); } @@ -698,7 +698,7 @@ var Lightbox = { // If not last image in set, display next image button. if ((Lightbox.total > 1 && Lightbox.loopItems) || Lightbox.activeImage != (Lightbox.total - 1)) { - $(nextLink).css({zIndex: '10500'}).show().click(function() { + $(nextLink).css({'zIndex': '10500'}).show().click(function() { Lightbox.changeData(Lightbox.activeImage + 1); return false; }); }