// WP jQuery compatibility
var $j = jQuery.noConflict();
$j(document).ready(function() {
	// hack to correctly initialize the width of the horizontal scrollbar by resizing the window on 1st load.
	$j(window).resize();

	// hide long titles from menu and image lists
	$j('li a').removeAttr("title");
	// hide titles from linked images
	$j('a img').removeAttr("title");
	// hide titles from images
	$j('img').removeAttr("title");

	// thumbnail click single post gallery
	$j(".thumbnail").click(function(){
		var imgId = $j(this).attr('rel');
		$j('.image-medium').hide();
		$j('#'+imgId).addClass('visible');
		$j('#'+imgId).fadeIn('slow');
	});

	$j('a.mail').each(function() {
		e = this.rel.replace('+++','@'); // replace #/# by @
		this.title = ''; // delete the title attribute
		this.href = 'mailto:' + e; // add mailto and href instead of rel
		$j(this).html(e); // replace "Contact" by complete email address
	});
});

// scrollpane custom scrollbars
$j(function() {
	$j('.scroll-pane').jScrollPane({scrollbarWidth:7,showArrows: true});
});

