	window.addEvent('domready', function() {
		/*var accordion = new Accordion('div.toggler', 'div.element', {
			alwaysHide:true,
			display:pagegroup,
			onActive: function(toggler, element){
				toggler.addClass('active');
			},
		 
			onBackground: function(toggler, element){
				toggler.removeClass('active');
			}
		}, $('leftnav'));*/
		
		// with added scroll
		var scroll = new Fx.Scroll('instance_frame', {
			wait: false,
			duration: 1500,
			transition: Fx.Transitions.Quad.easeInOut
		});
		 
		$('prev').addEvent('click', function(event) {
			event = new Event(event).stop();
			if (activeContent > beginIdx) {
				activeContent--;
				scroll.toElement('tsmn_'+activeContent);
			} else {
				activeContent=endIdx;
				scroll.toElement('tsmn_'+activeContent);
			}
		});
		 
		$('next').addEvent('click', function(event) {
			event = new Event(event).stop();
			if (activeContent < endIdx) {
				activeContent++;
				scroll.toElement('tsmn_'+activeContent);
			} else {
				activeContent=beginIdx;
				scroll.toElement('tsmn_'+activeContent);
			}
		});
		
		var beginIdx = 1;
		var endIdx = 9;
		var activeContent = beginIdx;
		 
	});


