// path to PHP script: http://www.futurefilmfestival.org/it/custom-archive/
		
		window.addEvent('domready', function() {
			/**			 * Gets all the links inside a give element
			 * and loops though them			 */
			var links = $('links').getElements('a');
			links.each(function(link, i) {
				
				/**				 * Changes the href property of links			 	 */
				link.querystring = link.getProperty('href');
				link.setProperty('href','javascript:void(0);');				link.addEvent('click', function(e) {
									/**					 * Prevent the submit event					 */					//new Event(e).stop();					 	
				 	/**					 * This empties the results and shows the spinning indicator					 */					var container = $('results').addClass('ajax-loading');
					var log = $('log').empty();
					var fx = new Fx.Style(log, 'opacity').set(0);
					
					/**					 * This sets the selected style to the clicked link					 */
					links.each(function(a, i) {
						a.removeClass('selected');
					});
					this.addClass('selected');
										var url = "http://www.futurefilmfestival.org/it/custom-archive/"+this.querystring;				 					/**					 * The simple way for an Ajax request
					 * onComplete removes the spinner from the results and fades in the data					 */					new Ajax(url, {						method: 'get',						update: log,						onComplete: function() {							container.removeClass('ajax-loading');
							fx = new Fx.Style(log, 'opacity', { duration: 800, wait:true, transition: Fx.Transitions.Quad.easeOut }).start(0, 1);						}					}).request();				});
				if(link.getText() == yselect) {
					link.fireEvent('click',null,300);
				}
			});
			//links[0].fireEvent('click',null,300);
		});
