/*****************************************************************
 *
 * flashLightBoxInjector 1.2 - by Bramus! - http://www.bram.us/
 *
 * v 1.2 - 2007.11.22 - Added prependElement function, and provided new Example
 * v 1.1 - 2007.08.03 - [fix] Array passed into flashLightBoxInjector appeared reversed in Lightbox2
 * v 1.0 - 2007.07.27 - initial release
 *
 * Licensed under the Creative Commons Attribution 2.5 License - http://creativecommons.org/licenses/by/2.5/
 *
 *****************************************************************/

	var flashLightBoxInjector = Class.create();
	
	flashLightBoxInjector.prototype = {
		
		initialize : function() {
			//alert('init start');
			//var objBody = document.getElementsByTagName("body").item(0);
			//var objContainer = document.createElement("div");
			//objContainer.setAttribute('id','flashLightBoxInjectionBox');
			//objContainer.style.display = 'none';
			//objBody.appendChild(objContainer);		
			//alert('init end');
		},
		
		reset : function() {
			//alert('reset start');
			//$('flashLightBoxInjectionBox').innerHTML = "";
			//alert('reset end');
		},
		
		appendElement : function(link, title, id, setId) {
			console.log('append link=' + link + ' title' + title + ' id=' + id + ' setId=' + setId + ' start');
			//new Insertion.Bottom('flashLightBoxInjectionBox', '<a href="' + link + '" title="' + title + '" id="' + id + '" rel="lightbox[' + setId + ']">' + link + '</a>');
			//alert('append link=' + link + ' title' + title + ' id=' + id + ' setId=' + setId + ' end');
		},
		
		prependElement : function(link, title, id, setId) {
			console.log('prepend link=' + link + ' title' + title + ' id=' + id + ' setId=' + setId + ' start');
			//new Insertion.Top('flashLightBoxInjectionBox', '<a href="' + link + '" title="' + title + '" id="' + id + '" rel="lightbox[' + setId + ']">' + link + '</a>');
			//alert('prepend link=' + link + ' title' + title + ' id=' + id + ' setId=' + setId + ' end');
		},
		
		updateImageList : function() {
			myLightbox.updateImageList();
		},
		
		start	: function(id) {
			//alert('OpenLightBox '+id);
			myLightbox.start($(id));	
		}
		
	}
	
	
	function initFlashLightBoxInjector() { myFlashLightBoxInjector = new flashLightBoxInjector(); }
	Event.observe(window, 'load', initFlashLightBoxInjector, false);
	
