function activate_UX()
{
	if($('topslider') !== null)
	{
	
	var navSlideShow;
	document.addEvent('domready', function(){
	
		// cache the navigation elements
		var n4vs = $('topslider-slideshow').getElements('a');
	
		// create a basic slideshow
		navSlideShow = new SlideShow('topslider-slideshow', {
			autoplay: true,
			delay: 3000,
			selector: 'article', // only create slides out of the images
			onShow: function(data){
				// update navigation elements' class depending upon the current slide
				n4vs[data.previous.index].removeClass('current');
				n4vs[data.next.index].addClass('current');
			}
		});
	
		n4vs.each(function(item, index){
			// click a nav item ...
			item.addEvent('click', function(event){
				event.stop();
				// pushLeft or pushRight, depending upon where
				// the slideshow already is, and where it's going
				var transition = (navSlideShow.index < index) ? 'pushLeft' : 'pushRight';
				// call show method, index of the navigation element matches the slide index
				// on-the-fly transition option
				navSlideShow.show(index, {transition: transition});
			});
		});	
	});
	
	}
	
	if($('imgslider') !== null)
	{
		var twoSlideShow;
		document.addEvent('domready', function(){
		
			// cache the imgslider elements
			var navs = $('imgslider-slideshow').getElements('a');
		
			// create a basic slideshow
			twoSlideShow = new SlideShow('imgslider-slideshow', {
				selector: 'span', // only create slides out of the images
				onShow: function(data){
					// update imgslider elements' class depending upon the current slide
					navs[data.previous.index].removeClass('current');
					navs[data.next.index].addClass('current');
				}
			});
		
			navs.each(function(item, index){
				// click a nav item ...
				item.addEvent('click', function(event){
					event.stop();
					// pushLeft or pushRight, depending upon where
					// the slideshow already is, and where it's going
					var transition = (twoSlideShow.index < index) ? 'pushLeft' : 'pushRight';
					// call show method, index of the navigation element matches the slide index
					// on-the-fly transition option
					twoSlideShow.show(index, {transition: transition});
				});
			});	
		});
		
		$$('.left').addEvent('click', function(){
			twoSlideShow.show('previous');
		});
		
		$$('.right').addEvent('click', function(){
			twoSlideShow.show('next');
		});
	}
	
	$$('.span-link').addEvent('click', function(){
		window.location = this.get('rel');
	});
}

window.addEvent('domready',function(){
	activate_UX();
});
