window.addEvent('domready', function() {
	
	// The data for the slideshow
	var wpdata_page0 = new Hash({'files/284B76FC-Foto_Inicio1.jpg':{caption: 'Foto Inicio1.jpg', href: 'files/284B76FC-Foto_Inicio1.jpg', thumbnail: 'files/284B76FC-Foto_Inicio1-t.jpg', target: '_self'},'files/E1CA8898-Foto_Inicio2.jpg':{caption: 'Foto Inicio2.jpg', href: 'files/E1CA8898-Foto_Inicio2.jpg', thumbnail: 'files/E1CA8898-Foto_Inicio2-t.jpg', target: '_self'},'files/18860575-Foto_Inicio3.jpg':{caption: 'Foto Inicio3.jpg', href: 'files/18860575-Foto_Inicio3.jpg', thumbnail: 'files/18860575-Foto_Inicio3-t.jpg', target: '_self'},'files/EA14F4A5-Foto_Inicio5.jpg':{caption: 'Foto Inicio5.jpg', href: 'files/EA14F4A5-Foto_Inicio5.jpg', thumbnail: 'files/EA14F4A5-Foto_Inicio5-t.jpg', target: '_self'},'files/6B82E994-Foto_Inicio10.jpg':{caption: 'Foto Inicio10.jpg', href: 'files/6B82E994-Foto_Inicio10.jpg', thumbnail: 'files/6B82E994-Foto_Inicio10-t.jpg', target: '_self'},'files/70255BEA-Foto_Inicio9.jpg':{caption: 'Foto Inicio9.jpg', href: 'files/70255BEA-Foto_Inicio9.jpg', thumbnail: 'files/70255BEA-Foto_Inicio9-t.jpg', target: '_self'},'files/916468F2-Yazport.jpg':{caption: 'Yazport.jpg', href: 'files/916468F2-Yazport.jpg', thumbnail: 'files/916468F2-Yazport-t.jpg', target: '_self'},'files/0CC5533A-Gabriel8.jpg':{caption: 'Gabriel8.jpg', href: 'files/0CC5533A-Gabriel8.jpg', thumbnail: 'files/0CC5533A-Gabriel8-t.jpg', target: '_self'},'files/A05859BD-Foto_Inicio7.jpg':{caption: 'Foto Inicio7.jpg', href: 'files/A05859BD-Foto_Inicio7.jpg', thumbnail: 'files/A05859BD-Foto_Inicio7-t.jpg', target: '_self'},'files/68553F35-Foto_Inicio8.jpg':{caption: 'Foto Inicio8.jpg', href: 'files/68553F35-Foto_Inicio8.jpg', thumbnail: 'files/68553F35-Foto_Inicio8-t.jpg', target: '_self'},'files/BE815A03-Iba_con lazo.jpg':{caption: 'Iba con lazo.jpg', href: 'files/BE815A03-Iba_con lazo.jpg', thumbnail: 'files/BE815A03-Iba_con lazo-t.jpg', target: '_self'},'files/BDF30839-Foto_Inicio6.jpg':{caption: 'Foto Inicio6.jpg', href: 'files/BDF30839-Foto_Inicio6.jpg', thumbnail: 'files/BDF30839-Foto_Inicio6-t.jpg', target: '_self'}});
	
	// The options for the slideshow
	var wpoptions_page0 = new Hash({width: 600,height: 600,resize: false,captions: false,controller: false,random: false,paused: false,preload: false,overlap: false,loop: true,delay: 2000,duration: 1000,pan: 100,zoom: 50,color: '#FFFFFF',thumbnails: false,thumbnailsOnTopOrBottom: true,thumbnail_width: 60,thumbnail_height: 60,linked: true,loader: {'animate': ['files/loader-#.png', 12]},classes: [	 'slideshow-page0', '', '', '',	 '', '', '', '',	 '', '', '', '',	 '', '', '', '']});
	
	// If thumbnails are enabled
	var thumbnails_enabled = wpoptions_page0.thumbnails;
	
	// If thumbnails are on top
	var thumbnailsOnTopOrBottom = wpoptions_page0.thumbnailsOnTopOrBottom;
	
	// The thumbnail
	var thumbnail = $$('.slideshow-page0-thumbnails ul li')[0];
	var thumbnail_height = wpoptions_page0.thumbnail_width;
	var thumbnail_width = wpoptions_page0.thumbnail_height;
	
	// The thumbnail div
	/*var thumbnail_wrapper = $$('.slideshow-page0-thumbnails ul')[0];
	var thumbnail_wrapper_height = thumbnail_wrapper.getStyle('height').toInt();
	var thumbnail_wrapper_width = thumbnail_wrapper.getStyle('width').toInt();*/
	
	if (typeof(wpember_page0) != 'undefined') {
		wpdata_page0.combine(wpember_page0);
	}
	
	if (typeof(wpflickr_page0) != 'undefined') {
		wpdata_page0.combine(wpflickr_page0);
	}
	
	if (typeof(wplocal_page0) != 'undefined') {
		wpdata_page0.combine(wplocal_page0);
	}
	
	if (typeof(wppicasa_page0) != 'undefined') {
		wpdata_page0.combine(wppicasa_page0);
	}
	// The slideshow
	wpshow_page0 = new Slideshow.Flash('weaverpix-page0-slideshow', wpdata_page0.getClean(), wpoptions_page0.getClean());
	
	// The total number of images
	if (thumbnails_enabled) {
		var count = wpdata_page0.getLength();
		$$('.slideshow-page0-thumbnails ul').each(function(el) {
		  var width = thumbnail_width;
		  var height = thumbnail_height;
	  
		  if (thumbnailsOnTopOrBottom) {
			width = width * count;
		  } else {
			height = height * count;
		  }
	  
		  el.setStyles({'width': width, 'height': height});
		});
	}
});
window.addEvent('domready', function() {
	var sb_state_page0;
	var sb_page0 = SqueezeBox.assign($$('#weaverpix-page0-slideshow .slideshow-page0-images a'), {
		onOpen: function() {
			sb_state_page0 = wpshow_page0.paused;
			wpshow_page0.pause(1);
		},
		onClose: function() {
			wpshow_page0.pause(sb_state_page0);
		}
	});
});


