function init() {
	$('noscript').empty();
	var busy = false, timer, loadedImages = [], gallery = $('gallery'),wrapper = $('gallerywrapper');
	var path = './images/kunden/th/';
	var images = [
		path + 'edding.gif',
		path + 'hamburg_mannheimer.gif',
		path + 'knorr.gif',
		path + 'tchibo.gif',
		path + 't-home.gif',
		path + 'kommunikations_verband.gif',
		path + 'hmi.gif',
		path + 't-mobile.gif',
		path + 'ndr.gif',
		path + 'puppo.gif',
		path + 'doubleclick.gif',
		path + 'porsche.gif',
		path + 'die_muehle.gif',
		path + 'cherry_picker.gif',
		path + 'hermes.gif',
		path + 'sylt_style.gif',
		path + 'nicole_fischer_casting.gif',
		path + 'the_berry_house.gif',
		path + 't-online.gif',
		path + 'becking_kaffee.gif',
		path + 'tom_tailor.gif',
		path + 'die_klappe.gif',
		path + 'roesler_electronic.gif',
		path + 'takeGAS.gif',
		path + 'crea.gif',
		path + 'stroeh.gif',
		path + 'DAR.gif',
		path + 'Ecoline.gif',
		path + 'Lidl.gif',
		path + 'Scout24.gif',
		path + 'maske.gif',
		path + 'thiele_peters.gif',
		path + 'otto.gif',
		path + 'wizard_corporate_textile_design.gif',
		path + 'becks.gif',
		path + 'ERGO.gif',
		path + 'AGI.gif',
		path + 'red_mills.gif'
	];
	//gallery.setStyles({'visibility':'hidden'});
	var scroll = new Fx.Scroll('galleryscroll', {
		wait: false,
		duration: 2000,
		offset: {'x': 0, 'y': 0},
		transition: Fx.Transitions.Quad.easeInOut
	});
	var aStep = wrapper.getStyle( 'width' ).toInt();
	var aCounter = 0;
	var max = 0;

	$('leftmover').addEvent('click', function(e) {

		e = new Event(e).stop();
		if( busy ) return;

		++aCounter;
			if( aCounter < 0 ) {
				aCounter = 0;
				return;
			}
			if( aCounter > max ) {
				aCounter = max;
				return;
			}
			var x = aCounter * aStep;
			scroll.scrollTo( x, 0 );
	});

	$('rightmover').addEvent('click', function(e) {
		e = new Event(e).stop();
		if( busy ) return;
		--aCounter;
			if( aCounter < 0 ) {
				aCounter = 0;
				return;
			}
			if( aCounter > max ) {
				aCounter = max;
				return;
			}
			var x = aCounter * aStep;
			scroll.scrollTo( x, 0 );
	});

	if (!busy) {
		busy = true;
		var galleryImgs = $$('#gallery img');
		new Asset.images(images, {
			onProgress: function(i) {
				loadedImages[i] = this;
			},
			onComplete: function() {
				var c = 0;
				loadedImages.each(function(image, i) {
					image.inject(gallery);
					c += image.width + 10;
				});
				gallery.setStyle('width', c );
				max = ( c / wrapper.getStyle('width').toInt() ).toInt();
				//var fx = $('gallery').effect('opacity').start(1);
				//$('gallery').setStyle( 'visibility','visible' );
				busy = false;
			}
		});
	}

}
window.addEvent('domready', init);