

window.addEvent('domready', function() {

	
	$$('img').each(function(img){
		img.setProperty('galleryimg','no');
		var myDrag = new Drag(img);
		img.addEvents({
			'contextmenu': function(event){
				return false;
			}
		});
	})


	function setYellowImage(){
		var yellowImage = document.getElements('img.yellowimage');
		yellowImage.each(function(img){
			var src = img.get('src');
			// img.set({'src':'_image.php?file='+src})
			img.addEvents({
				'mouseenter': function(){
					img.set({'src':'_image.php?file='+src})
					// img.set({'src':src})
				},
				'mouseleave': function(){
					img.set({'src':src})
					// img.set({'src':'_image.php?file='+src})
				}
			})
		});
	}
	
	setYellowImage();
	
	
	$$('.LinkIn').each(function(bt){
		bt.addEvents({
			'click': function(event){
				event.preventDefault();
				leavepage(bt.get('href'));
			}
		});
	});


});
window.addEvent('domready', function() {

	$$('a.mytip').each(function(element,index) { var content = element.get('title').split('::'); element.store('tip:title', content[0]); element.store('tip:text', ''); });
	var tipz = new Tips('.mytip',{ className: 'mytip', fixed: false, hideDelay: 0, showDelay: 500 });
	
	startafterload();
	
});


window.addEvent('load', function() {

});

var startafterloadFired = false;

function startafterload(){
	if (startafterloadFired == false){
		startafterloadFired = true;
		var myFx2 = new Fx.Tween($('Content'),{duration: 500,transition: Fx.Transitions.Quart.easeInOut,onComplete: function(){
			(function(){ loadpage(); }).delay(200);
		}}).set('opacity',0).start('opacity', 1);
	}
}

function gotopage(url){
	var myFx2 = new Fx.Tween($('Content'),{duration: 600,transition: Fx.Transitions.Quart.easeIn,onComplete: function(){
		(function(){ document.location.href = url; }).delay(10);
	}}).set('opacity',1).start('opacity', 0);
}


