function swapImage(imgsrc) {
	var newsrc='img/photos/images/'+imgsrc+'.jpg';
//	alert(newsrc);
	if ( document.getElementById ) {
		document.getElementById('mainImg').setAttribute('src', newsrc);
	}
}

var myrules = {
	'.thumb' : function(el){
		el.onclick = function(){
			swapImage(this.getAttribute('id'));
		};
		el.onmouseover = function(){
			this.style.cursor='pointer';
		};
		el.onmouseout = function(){
			this.style.cursor='default';
		}
	}
	
};

Behaviour.register(myrules);
