// JavaScript Document
window.addEvent('domready', function(){


	ReMooz.assign('a.rem', {
					'origin': 'img',
					'shadow': 'onOpenEnd', // fx is faster because shadow appears after resize animation
					'resizeFactor': 0.8, // resize to maximum 80% of screen size
					'cutOut': false, // don't hide the original
					'opacityResize': 0.4, // opaque resize
					'dragging': false, // disable dragging
					'centered': true // resize to center of the screen, not relative to the source element
		});


	//if($('gallist')){
	if($('show')){
		
		
	   //var list = $('gallist').value;
	   //var alist = list.split(",");
	   //var data = alist
	   //var myShow = new Slideshow('show', data, {captions:false,controller: true, height: 331, width:500, hu: 'files/', thumbnails: true,delay:4000});
	   var myShow = new Slideshow('show', data, {linked:false,center:false,overlap:false,resize:'length',captions:true,width: 500,controller: true, hu: 'files/', thumbnails: true,delay:4000});


		/*
	
	   $('slidenext').addEvent('click',function(event){
		myShow.next();										
	   });
	   
	   $('slideback').addEvent('click',function(event){
		myShow.prev();										
	   });
	   
	   $('slidepause').addEvent('click',function(event){
		  myShow.pause(p);
		  if(p == 1){
			  p = 0;
			  this.set('text','Start');
		  }else{
			  p = 1;
			  this.set('text','Pause');
		  }
	   });
		*/
		
	   myShow.go(0); 
	
	}
	
	
	SqueezeBox.parsers.swf = function(preset) {
		return (preset || this.url.test(/\.swf/)) ? this.url : false;
	};
 
	SqueezeBox.handlers.swf = function(url) {
		var size = this.options.size;
		return new Swiff(url, {
		id: 'sbox-swf',
		width: size.x,
		height: size.y
	});
	};
  
	/**
	 * That CSS selector will find all <a> elements with the
	 * class boxed.
	 *
	 * The second argument sets additional options
	 */
	SqueezeBox.assign($$('a.boxed'), {
		parse: 'rel'
	});
		

})
		
	   