Use the new json2 module (from yaws)
[euphorik.git] / js / libs / jquery.lightbox.js
index 41c425f..528a30b 100644 (file)
@@ -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.\r
                        keyToPrev:                              'p',            // (string) (p = previous) Letter to show the previous image\r
                        keyToNext:                              'n',            // (string) (n = next) Letter to show the next image.\r
-                       // Don´t alter these variables in any way\r
+                       // Dont alter these variables in any way\r
                        imageArray:                             [],\r
                        activeImage:                    0\r
                },settings);\r
                        settings.imageArray.length = 0;\r
                        // Unset image active information\r
                        settings.activeImage = 0;\r
-                       // We have an image set? Or just an image? Let´s see it.\r
+                       // We have an image set? Or just an image? Lets see it.\r
                        if ( jQueryMatchedObj.length == 1 ) {\r
                                settings.imageArray.push(new Array(objClicked.getAttribute('href'),objClicked.getAttribute('title')));\r
                        } else {\r
-                               // Add an Array (as many as we have), with href and title atributes, inside the Array that storage the images references                \r
+                               // Add an Array (as many as we have), with href and title atributes, inside the Array that storage the images references\r
                                for ( var i = 0; i < jQueryMatchedObj.length; i++ ) {\r
                                        settings.imageArray.push(new Array(jQueryMatchedObj[i].getAttribute('href'),jQueryMatchedObj[i].getAttribute('title')));\r
                                }\r
                 */\r
                function _set_interface() {\r
                        // Apply the HTML markup into body tag\r
-                       $('body').append('<div id="jquery-overlay"></div><div id="jquery-lightbox"><div id="lightbox-container-image-box"><div id="lightbox-container-image"><img id="lightbox-image"><div style="" id="lightbox-nav"><a href="#" id="lightbox-nav-btnPrev"></a><a href="#" id="lightbox-nav-btnNext"></a></div><div id="lightbox-loading"><a href="#" id="lightbox-loading-link"><img src="' + settings.imageLoading + '"></a></div></div></div><div id="lightbox-container-image-data-box"><div id="lightbox-container-image-data"><div id="lightbox-image-details"><span id="lightbox-image-details-caption"></span><span id="lightbox-image-details-currentNumber"></span></div><div id="lightbox-secNav"><a href="#" id="lightbox-secNav-btnClose"><img src="' + settings.imageBtnClose + '"></a></div></div></div></div>');       \r
+                       $('body').append('<div id="jquery-overlay"></div><div id="jquery-lightbox"><div id="lightbox-container-image-box"><div id="lightbox-container-image"><img id="lightbox-image"><div style="" id="lightbox-nav"><a href="#" id="lightbox-nav-btnPrev"></a><a href="#" id="lightbox-nav-btnNext"></a></div><div id="lightbox-loading"><a href="#" id="lightbox-loading-link"><img src="' + settings.imageLoading + '"></a></div></div></div><div id="lightbox-container-image-data-box"><div id="lightbox-container-image-data"><div id="lightbox-image-details"><span id="lightbox-image-details-caption"></span><span id="lightbox-image-details-currentNumber"></span></div><div id="lightbox-secNav"><a href="#" id="lightbox-secNav-btnClose"><img src="' + settings.imageBtnClose + '"></a></div></div></div></div>');\r
                        // Get page sizes\r
                        var arrPageSizes = ___getPageSize();\r
                        // Style overlay and show it\r
                        }).show();\r
                        // Assigning click events in elements to close overlay\r
                        $('#jquery-overlay,#jquery-lightbox').click(function() {\r
-                               _finish();                                                                      \r
+                               _finish();\r
                        });\r
                        // Assign the _finish function to lightbox-loading-link and lightbox-secNav-btnClose objects\r
                        $('#lightbox-loading-link,#lightbox-secNav-btnClose').click(function() {\r
                        });\r
                }\r
                /**\r
-                * Prepares image exibition; doing a image´s preloader to calculate it´s size\r
+                * Prepares image exibition; doing a image�s preloader to calculate it�s size\r
                 *\r
                 */\r
                function _set_image_to_view() { // show the loading\r
                /**\r
                 * Perfomance an effect in the image container resizing it\r
                 *\r
-                * @param integer intImageWidth The image´s width that will be showed\r
-                * @param integer intImageHeight The image´s height that will be showed\r
+                * @param integer intImageWidth The images width that will be showed\r
+                * @param integer intImageHeight The images height that will be showed\r
                 */\r
                function _resize_container_image_box(intImageWidth,intImageHeight) {\r
                        // Get current width and height\r
                        var intCurrentWidth = $('#lightbox-container-image-box').width();\r
                        var intCurrentHeight = $('#lightbox-container-image-box').height();\r
                        // Get the width and height of the selected image plus the padding\r
-                       var intWidth = (intImageWidth + (settings.containerBorderSize * 2)); // Plus the image´s width and the left and right padding value\r
-                       var intHeight = (intImageHeight + (settings.containerBorderSize * 2)); // Plus the image´s height and the left and right padding value\r
+                       var intWidth = (intImageWidth + (settings.containerBorderSize * 2)); // Plus the images width and the left and right padding value\r
+                       var intHeight = (intImageHeight + (settings.containerBorderSize * 2)); // Plus the images height and the left and right padding value\r
                        // Diferences\r
                        var intDiffW = intCurrentWidth - intWidth;\r
                        var intDiffH = intCurrentHeight - intHeight;\r
                                if ( $.browser.msie ) {\r
                                        ___pause(250);\r
                                } else {\r
-                                       ___pause(100);  \r
+                                       ___pause(100);\r
                                }\r
-                       } \r
+                       }\r
                        $('#lightbox-container-image-data-box').css({ width: intImageWidth });\r
                        $('#lightbox-nav-btnPrev,#lightbox-nav-btnNext').css({ height: intImageHeight + (settings.containerBorderSize * 2) });\r
                };\r
                        // If we have a image set, display 'Image X of X'\r
                        if ( settings.imageArray.length > 1 ) {\r
                                $('#lightbox-image-details-currentNumber').html(settings.txtImage + ' ' + ( settings.activeImage + 1 ) + ' ' + settings.txtOf + ' ' + settings.imageArray.length).show();\r
-                       }               \r
+                       }\r
                }\r
                /**\r
                 * Display the button navigations\r
                function _set_navigation() {\r
                        $('#lightbox-nav').show();\r
 \r
-                       // Instead to define this configuration in CSS file, we define here. And it´s need to IE. Just.\r
+                       // Instead to define this configuration in CSS file, we define here. And its need to IE. Just.\r
                        $('#lightbox-nav-btnPrev,#lightbox-nav-btnNext').css({ 'background' : 'transparent url(' + settings.imageBlank + ') no-repeat' });\r
-                       \r
+\r
                        // Show the prev button, if not the first image in set\r
                        if ( settings.activeImage != 0 ) {\r
                                if ( settings.fixedNavigation ) {\r
                                        });\r
                                }\r
                        }\r
-                       \r
+\r
                        // Show the next button, if not the last image in set\r
                        if ( settings.activeImage != ( settings.imageArray.length -1 ) ) {\r
                                if ( settings.fixedNavigation ) {\r
                        }\r
                        // Verify the key to show the previous image\r
                        if ( ( key == settings.keyToPrev ) || ( keycode == 37 ) ) {\r
-                               // If we´re not showing the first image, call the previous\r
+                               // If were not showing the first image, call the previous\r
                                if ( settings.activeImage != 0 ) {\r
                                        settings.activeImage = settings.activeImage - 1;\r
                                        _set_image_to_view();\r
                        }\r
                        // Verify the key to show the next image\r
                        if ( ( key == settings.keyToNext ) || ( keycode == 39 ) ) {\r
-                               // If we´re not showing the last image, call the next\r
+                               // If were not showing the last image, call the next\r
                                if ( settings.activeImage != ( settings.imageArray.length - 1 ) ) {\r
                                        settings.activeImage = settings.activeImage + 1;\r
                                        _set_image_to_view();\r
                 */\r
                function ___getPageSize() {\r
                        var xScroll, yScroll;\r
-                       if (window.innerHeight && window.scrollMaxY) {  \r
+                       if (window.innerHeight && window.scrollMaxY) {\r
                                xScroll = window.innerWidth + window.scrollMaxX;\r
                                yScroll = window.innerHeight + window.scrollMaxY;\r
                        } else if (document.body.scrollHeight > document.body.offsetHeight){ // all but Explorer Mac\r
                        var windowWidth, windowHeight;\r
                        if (self.innerHeight) { // all except Explorer\r
                                if(document.documentElement.clientWidth){\r
-                                       windowWidth = document.documentElement.clientWidth; \r
+                                       windowWidth = document.documentElement.clientWidth;\r
                                } else {\r
                                        windowWidth = self.innerWidth;\r
                                }\r
                        } else if (document.body) { // other Explorers\r
                                windowWidth = document.body.clientWidth;\r
                                windowHeight = document.body.clientHeight;\r
-                       }       \r
+                       }\r
                        // for small pages with total height less then height of the viewport\r
                        if(yScroll < windowHeight){\r
                                pageHeight = windowHeight;\r
-                       } else { \r
+                       } else {\r
                                pageHeight = yScroll;\r
                        }\r
                        // for small pages with total width less then width of the viewport\r
-                       if(xScroll < windowWidth){      \r
-                               pageWidth = xScroll;            \r
+                       if(xScroll < windowWidth){\r
+                               pageWidth = xScroll;\r
                        } else {\r
                                pageWidth = windowWidth;\r
                        }\r
                                xScroll = document.documentElement.scrollLeft;\r
                        } else if (document.body) {// all other Explorers\r
                                yScroll = document.body.scrollTop;\r
-                               xScroll = document.body.scrollLeft;     \r
+                               xScroll = document.body.scrollLeft;\r
                        }\r
                        arrayPageScroll = new Array(xScroll,yScroll);\r
                        return arrayPageScroll;\r
                  *\r
                  */\r
                 function ___pause(ms) {\r
-                       var date = new Date(); \r
+                       var date = new Date();\r
                        curDate = null;\r
                        do { var curDate = new Date(); }\r
                        while ( curDate - date < ms);\r
                // Return the jQuery object for chaining. The unbind method is used to avoid click conflict when the plugin is called more than once\r
                return this.unbind('click').click(_initialize);\r
        };\r
-})(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\r