function showLocation(sel){
	val = sel.value;
	window.document.location.href = val;
}

$(document).ready(function() {

	
			
	$('.gallery a').attr('rel', 'fancy_group');
	$('.highslide').attr('rel', 'fancy_group');
	//$('.gallery a').attr('onclick', 'return hs.expand(this);');

	
	$("a[rel=fancy_group]").fancybox({
		'onComplete' : function() {
			$('img').mousedown(function(e) {
			e.preventDefault();
			return false;
		});
		},
		'padding'	: 0,
		'overlayShow' : true,
		'overlayOpacity' : '1',
		'overlayColor' : '#000000',
		'transitionIn'		: 'elastic',
		'transitionOut'		: 'elastic',
		'titlePosition' 	: 'over',
		'autoScale' : true,
		'titleFormat'       : function(title, currentArray, currentIndex, currentOpts) {
		   // return '<span id="fancybox-title-over">Image ' +  (currentIndex + 1) + ' / ' + currentArray.length + '</span>';
		}
	});
	
		
		$('img').mousedown(function(e) {
			e.preventDefault();
			return false;
		});
	
			$('.fancybox img').mousedown(function(e) {
			e.preventDefault();
			return false;
		});
		
		$('#slideshow-wrapper').hover(function() {
			$('#viewlatest').append('<a href="http://jhunterphotography.com/blog" id="view-latest-work"><img src="images/view-latest-work.png" /></a>');
			$('#view-latest-work').fadeIn(500);
		}, function() {
		
			$('#view-latest-work').remove();
		});
		


});




