// JavaScript Document

jQuery(document).ready(function($) {
		var onMouseOutOpacity = 0.4;
		$('#thumbs ul.thumbs li').opacityrollover({
			mouseOutOpacity:   onMouseOutOpacity,
			mouseOverOpacity:  1.0,
			fadeSpeed:         'fast',
			exemptionSelector: '.selected'
		});
		
		initSelection();
	
		function pageload(hash) {
			if(hash) { gotoImageByHash(hash); } 
			else { gotoPage(1); }
		}

		$.historyInit(pageload, "history.html");

		$("a[rel='history']").live('click', function(e) {
			if (e.button != 0) return true;
			var hash = this.href;
			hash = hash.replace(/^.*#/, '');
			$.historyLoad(hash);
			return false;
		});
	});
