// JavaScript Document

function sliderinit(obj) {

		var htmlSlider = new Fx.Slide('htmlcode', {
			duration: 500, 
			onComplete: function(){
        if (this.now[0] > 0) this.wrapper.setStyle('height', '');
			}
		});
		
		htmlSlider.hide();
		
		// button.addEvent('click', function(){htmlSlider.toggle();});

}
	
function accordioninit(trig, box){
		var ac = new fx.Accordion(trig, box, {openClose : true, 'alwaysHide' : true, 'start': 'all-closed'});
}
	
function fade(obj) {

		var navigationeffect = new Fx.Style(obj, 'opacity', {duration: 600}).set(0.7);
		obj.addEvent('mouseenter', function(){navigationeffect.custom(0.7,1);});
		obj.addEvent('mouseleave', function(){navigationeffect.custom(1,0.7);});
		
		// marginChange.start(20);
		// var marginChange = new Fx.Style(obj, 'margin-top', {duration:500});
		// new Fx.Style(obj, 'background-color', {duration: 500}).start('ccc','000');
		
}
	
function tooltip() {
		/* setup tooltips */
		var as = [];

	$S('a').each(function(a){
		if (a.getAttribute('title')) as.push(a);
	});
	
	new Tips(as, {maxOpacity: 0.9, maxTitleChars: 25});
}
	
