X-Git-Url: http://git.euphorik.ch/?a=blobdiff_plain;f=js%2Flibs%2Fjquery.lightbox.js;h=528a30bcd6aa4e6905585041dcc0c3b7d5b57028;hb=79f0cfc91b7220d98e4caf50fbb3857807fc6bc4;hp=41c425ff1812b0927ae51c751c45952f04d9b855;hpb=6c0fcdfaefd072f8b0ee1d7d8f1ba2a2c1ede8ec;p=euphorik.git diff --git a/js/libs/jquery.lightbox.js b/js/libs/jquery.lightbox.js index 41c425f..528a30b 100644 --- a/js/libs/jquery.lightbox.js +++ b/js/libs/jquery.lightbox.js @@ -42,7 +42,7 @@ keyToClose: 'c', // (string) (c = close) Letter to close the jQuery lightBox interface. Beyond this letter, the letter X and the SCAPE key is used to. keyToPrev: 'p', // (string) (p = previous) Letter to show the previous image keyToNext: 'n', // (string) (n = next) Letter to show the next image. - // Don´t alter these variables in any way + // Don�t alter these variables in any way imageArray: [], activeImage: 0 },settings); @@ -72,11 +72,11 @@ settings.imageArray.length = 0; // Unset image active information settings.activeImage = 0; - // We have an image set? Or just an image? Let´s see it. + // We have an image set? Or just an image? Let�s see it. if ( jQueryMatchedObj.length == 1 ) { settings.imageArray.push(new Array(objClicked.getAttribute('href'),objClicked.getAttribute('title'))); } else { - // Add an Array (as many as we have), with href and title atributes, inside the Array that storage the images references + // Add an Array (as many as we have), with href and title atributes, inside the Array that storage the images references for ( var i = 0; i < jQueryMatchedObj.length; i++ ) { settings.imageArray.push(new Array(jQueryMatchedObj[i].getAttribute('href'),jQueryMatchedObj[i].getAttribute('title'))); } @@ -125,7 +125,7 @@ */ function _set_interface() { // Apply the HTML markup into body tag - $('body').append('
'); + $('body').append('
'); // Get page sizes var arrPageSizes = ___getPageSize(); // Style overlay and show it @@ -144,7 +144,7 @@ }).show(); // Assigning click events in elements to close overlay $('#jquery-overlay,#jquery-lightbox').click(function() { - _finish(); + _finish(); }); // Assign the _finish function to lightbox-loading-link and lightbox-secNav-btnClose objects $('#lightbox-loading-link,#lightbox-secNav-btnClose').click(function() { @@ -170,7 +170,7 @@ }); } /** - * Prepares image exibition; doing a image´s preloader to calculate it´s size + * Prepares image exibition; doing a image�s preloader to calculate it�s size * */ function _set_image_to_view() { // show the loading @@ -196,16 +196,16 @@ /** * Perfomance an effect in the image container resizing it * - * @param integer intImageWidth The image´s width that will be showed - * @param integer intImageHeight The image´s height that will be showed + * @param integer intImageWidth The image�s width that will be showed + * @param integer intImageHeight The image�s height that will be showed */ function _resize_container_image_box(intImageWidth,intImageHeight) { // Get current width and height var intCurrentWidth = $('#lightbox-container-image-box').width(); var intCurrentHeight = $('#lightbox-container-image-box').height(); // Get the width and height of the selected image plus the padding - var intWidth = (intImageWidth + (settings.containerBorderSize * 2)); // Plus the image´s width and the left and right padding value - var intHeight = (intImageHeight + (settings.containerBorderSize * 2)); // Plus the image´s height and the left and right padding value + var intWidth = (intImageWidth + (settings.containerBorderSize * 2)); // Plus the image�s width and the left and right padding value + var intHeight = (intImageHeight + (settings.containerBorderSize * 2)); // Plus the image�s height and the left and right padding value // Diferences var intDiffW = intCurrentWidth - intWidth; var intDiffH = intCurrentHeight - intHeight; @@ -215,9 +215,9 @@ if ( $.browser.msie ) { ___pause(250); } else { - ___pause(100); + ___pause(100); } - } + } $('#lightbox-container-image-data-box').css({ width: intImageWidth }); $('#lightbox-nav-btnPrev,#lightbox-nav-btnNext').css({ height: intImageHeight + (settings.containerBorderSize * 2) }); }; @@ -246,7 +246,7 @@ // If we have a image set, display 'Image X of X' if ( settings.imageArray.length > 1 ) { $('#lightbox-image-details-currentNumber').html(settings.txtImage + ' ' + ( settings.activeImage + 1 ) + ' ' + settings.txtOf + ' ' + settings.imageArray.length).show(); - } + } } /** * Display the button navigations @@ -255,9 +255,9 @@ function _set_navigation() { $('#lightbox-nav').show(); - // Instead to define this configuration in CSS file, we define here. And it´s need to IE. Just. + // Instead to define this configuration in CSS file, we define here. And it�s need to IE. Just. $('#lightbox-nav-btnPrev,#lightbox-nav-btnNext').css({ 'background' : 'transparent url(' + settings.imageBlank + ') no-repeat' }); - + // Show the prev button, if not the first image in set if ( settings.activeImage != 0 ) { if ( settings.fixedNavigation ) { @@ -281,7 +281,7 @@ }); } } - + // Show the next button, if not the last image in set if ( settings.activeImage != ( settings.imageArray.length -1 ) ) { if ( settings.fixedNavigation ) { @@ -346,7 +346,7 @@ } // Verify the key to show the previous image if ( ( key == settings.keyToPrev ) || ( keycode == 37 ) ) { - // If we´re not showing the first image, call the previous + // If we�re not showing the first image, call the previous if ( settings.activeImage != 0 ) { settings.activeImage = settings.activeImage - 1; _set_image_to_view(); @@ -355,7 +355,7 @@ } // Verify the key to show the next image if ( ( key == settings.keyToNext ) || ( keycode == 39 ) ) { - // If we´re not showing the last image, call the next + // If we�re not showing the last image, call the next if ( settings.activeImage != ( settings.imageArray.length - 1 ) ) { settings.activeImage = settings.activeImage + 1; _set_image_to_view(); @@ -395,7 +395,7 @@ */ function ___getPageSize() { var xScroll, yScroll; - if (window.innerHeight && window.scrollMaxY) { + if (window.innerHeight && window.scrollMaxY) { xScroll = window.innerWidth + window.scrollMaxX; yScroll = window.innerHeight + window.scrollMaxY; } else if (document.body.scrollHeight > document.body.offsetHeight){ // all but Explorer Mac @@ -408,7 +408,7 @@ var windowWidth, windowHeight; if (self.innerHeight) { // all except Explorer if(document.documentElement.clientWidth){ - windowWidth = document.documentElement.clientWidth; + windowWidth = document.documentElement.clientWidth; } else { windowWidth = self.innerWidth; } @@ -419,16 +419,16 @@ } else if (document.body) { // other Explorers windowWidth = document.body.clientWidth; windowHeight = document.body.clientHeight; - } + } // for small pages with total height less then height of the viewport if(yScroll < windowHeight){ pageHeight = windowHeight; - } else { + } else { pageHeight = yScroll; } // for small pages with total width less then width of the viewport - if(xScroll < windowWidth){ - pageWidth = xScroll; + if(xScroll < windowWidth){ + pageWidth = xScroll; } else { pageWidth = windowWidth; } @@ -451,7 +451,7 @@ xScroll = document.documentElement.scrollLeft; } else if (document.body) {// all other Explorers yScroll = document.body.scrollTop; - xScroll = document.body.scrollLeft; + xScroll = document.body.scrollLeft; } arrayPageScroll = new Array(xScroll,yScroll); return arrayPageScroll; @@ -461,7 +461,7 @@ * */ function ___pause(ms) { - var date = new Date(); + var date = new Date(); curDate = null; do { var curDate = new Date(); } while ( curDate - date < ms); @@ -469,4 +469,4 @@ // Return the jQuery object for chaining. The unbind method is used to avoid click conflict when the plugin is called more than once return this.unbind('click').click(_initialize); }; -})(jQuery); // Call and execute the function immediately passing the jQuery object \ No newline at end of file +})(jQuery); // Call and execute the function immediately passing the jQuery object