function ux_select_image(i_dom_id) {  
	var small_image = $(i_dom_id);
	var large_url = small_image.getAttribute("ux:larger");   
	var huge_url = small_image.getAttribute("ux:huge");
	var main_el = $('image_main');                     
	$('image_huge_link').setAttribute('href', huge_url);
	var queue = {scope: 'img_main', position: 'end'};   

    new Effect.Morph(main_el, {
	  style: 'opacity: 0.0;',
	  duration: 0.25,
	  queue: queue
	});           
	new Effect.Event({queue: queue, afterFinish: function() {
		
		var img = new Image();
		img.onload = (function(bool){ 
			$('loading_indicator').hide();
     		main_el.setAttribute('src', large_url);
    		new Effect.Morph(main_el, {
			  				style: 'opacity: 1.0;',
	   						duration: 0.25,
	   						queue: queue
	 					    });   

		});
		img.onerror = (function(bool) {
			$('loading_indicator').hide();
		});
		$('loading_indicator').show();
		img.src = large_url;
	 
	    
	}});
	// new Effect.Morph(main_el, {
	//   style: 'opacity: 1.0;',
	//   duration: 0.25,
	//   queue: queue
	// });   
}
