//------------------------------------------------------------- // FrogJS v.1.1 // Created by Eric Puidokas (www.puidokas.com) // // Licensed under the Creative Commons Attribution 2.5 License // (http://creativecommons.org/licenses/by/2.5/) //------------------------------------------------------------- // CONFIGURATION VARIABLES var thumbTop = '60px'; // distance you want you thumbnails to be from the top of their container var loadingAni = 'images/loading.gif'; // image displayed when preloading images var scalePercent = '300'; // percent thumbnails expand when fading into main image // GLOBALS var imageArray = new Array; // Extensions to the Element class from prototype.js Object.extend(Element, { removeDimensions: function(element){ element = $(element); element.style.width = ''; element.style.height = ''; }, removeOnclick: function(element){ element = $(element); element.onclick = function(){} }, setCursor: function(element, cursor){ element = $(element); element.style.cursor = cursor; } }); // Frog Class var Frog = Class.create(); Frog.prototype = { // initialize() // Constructor runs once the page has been loaded. It extracts any linked images within an element with id 'FrogJS' and builds the array for the FrogJS Gallery // It then empties the 'FrogJS' element and inserts the neccessary DOM elements to run a FrogJS gallery. Lastly, it calls the functions to load the first image and thumbnail. initialize: function(){ if(!document.getElementsByTagName){ return; } // Builds imageArray of all images, thumbnails, credits, and captions var anchors = $('FrogJS').getElementsByTagName('a'); for (var i=0; i