/**
File Name: gallery.js
Plugin Name: ajaxGallery
Plugin URI: http://www.laciudadx.com/trabajos/ajaxgallery
Description: Ajax + Picasa + Thickbox
Author: Sergio Ceron Figueroa
Version: 1.0
Author URI: http://www.laciudadx.com
Copyright (C) 2007 Sergio Ceron F. (http://laciudadx.com)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
function initAlbums( root ){
gallery.configs.albums = root;
}
function ajaxgallery( config ){
this.configs = config;
};
ajaxgallery.prototype.showAlbums = showAlbums;
ajaxgallery.prototype.showAlbum = showAlbum;
ajaxgallery.prototype.createTable = createTable;
ajaxgallery.prototype.clean = clean;
ajaxgallery.prototype.loadscript = loadscript;
ajaxgallery.prototype.Pagination=Pagination;
function showAlbums(root){
if( root ){ root = root;this.configs.albums = root;
}else{root = this.configs.albums;}
var feed = root.feed;
var entries = feed.entry || [];
var pwaFetch = feed.entry.length;
var pwaImageSize = 160;
var div = document.getElementById( this.configs.id );
var table = this.createTable();
for ( i = 0, r = 0, c = 0; i < pwaFetch ; ++i){
var entry = feed.entry[i];
var title = entry.title.$t;
var jsonImage = entry.media$group.media$content[0].url;
var link = entry.link[1].href;
var tr = table.getElementsByTagName("tr")[ r ];
var td = tr.getElementsByTagName( "td" )[ c ];
td.innerHTML= "";
td.innerHTML+= "