window.addEvent('domready', function(){									 
// tips

var tips = new Tips($$('.tips'), {
	initialize:function(){
		this.fx = new Fx.Style(this.toolTip, 'opacity', {duration: 500, wait: false}).set(0);
	},
	onShow: function(toolTip) {
		this.fx.start(1);
	},
	onHide: function(toolTip) {
		this.fx.start(0);
	}
});

function ajaxtips(){
var ajaxtips = new Tips($$('.ajaxtips'), {
	initialize:function(){
		this.fx = new Fx.Style(this.toolTip, 'opacity', {duration: 500, wait: false}).set(0);
	},
	onShow: function(toolTip) {
		this.fx.start(1);
	},
	onHide: function(toolTip) {
		this.fx.start(0);
	}
});
}

// password reminder

if($("reminder")){
$('reminder').addEvent('click', function(re) {			
geturl = this.getProperty('href');
splitting = geturl.split('?');
vars = splitting[1];
new Event(re).stop();
var loadevent = $('console-cnt').empty();
new Ajax('profile.php', {
method: 'get',
postBody: vars,
update: $('console-cnt')
}).request();
});
};

// photogallery
$$('.photoref').addEvent('click', function(re) {			
geturl = this.getProperty('href');
splitting = geturl.split('?');
vars = splitting[1];
new Event(re).stop();
var loadevent = $('showthem').empty().addClass('photos_wait');
new Ajax('photosupdate.php', {
method: 'get',
postBody: vars,
update: $('showthem'),
onComplete: function() {
loadevent.removeClass('photos_wait');
ajaxtips();
Lightbox.anchors = [];
$A(document.links).each(function(tag){
if(tag.rel && tag.rel.test('^lightbox', 'i')) {
tag.onclick = this.click.pass(tag, this);
this.anchors.push(tag);
}
}, Lightbox);
//myFader.custom(0,1);
}
}).request();
});

});