
var j$ = jQuery.noConflict();

j$(document).ready(function(){

	// set rollover.
	j$('img[@class=over]').hover(
		function(){
			this.src = this.src.replace(/^(.+)(\.[a-z]+)$/, '$1_over$2');
		},
		function(){
			this.src = this.src.replace(/^(.+)_over(\.[a-z]+)$/, '$1$2');
		})
		.each(function(){
			this.preloaded = new Image;
			this.preloaded.src = this.src.replace(/^(.+)(\.[a-z]+)$/, '$1_over$2');
		}
	);

	// set active states.
	j$('img[@class=current]').each(function(i){
		this.src = this.src.replace(/^(.+)(\.[a-z]+)$/, '$1_over$2');
	});

	// open the external links in new window.
	j$('a[@rel=external]').click(function(){
		window.open(this.href, '_blank');
		return false;
	});

});
