var goahead = {

	activate: function(){

		$$('a.test').each(function(el) {
			el.addEvent('mouseover', function() {
				var opac = new Fx.Style(el, 'opacity').start(0.2,1); });
		});
	},

	imageeffect: function(el){
		new Fx.Style(el, 'opacity');
	},

	imageswap: function(){

		var picpath = 'http://vinnes.no/pic/';

		$$('img.baatbilde').each(function(el) {
			el.addEvent('click', function(){
				$('swap').src = picpath + el.alt;

			});
		});
	},

	makeAccordions: function(){
		$$('dl.meny').each(function(el){
			new Accordion(el.getElements('dt'), el.getElements('dd'));
		});
	},

	thingy: function(){

		$$('img.baatbilde', 'li.lang').each(function(el) {
			if(el.hasClass('active')) {
				el.addEvent('mouseover', function() {
					var opac = new Fx.Style(el, 'opacity').start(1,0.2);
				});
			} else {
				el.addEvent('mouseover', function() {
					var opac = new Fx.Style(el, 'opacity').start(0.7,1);
				});
			}
		}),
		$$('li.lang').each(function(el) {
			if(el.hasClass('active')) {
				var opac = new Fx.Style(el, 'opacity').start(1,0.2);
			}
		});

	},
	init: function() { this.activate(); this.imageswap(); this.thingy(); this.makeAccordions(); }

};

	window.onDomReady(goahead.init.bind(goahead));