// front-end javascripts go here

jQuery(function($) {
	
	
	bar_width = jQuery('#submenu ul').width() > 110 ? jQuery('#submenu ul').width() : 110 
	jQuery('#bracebar').width(bar_width);
		
	jQuery('#wrapper').supersleight();
	jQuery('#left').supersleight();
	jQuery('#left_link a img').supersleight();
	jQuery('#right_link a img').supersleight();
	jQuery('#right').supersleight();
	jQuery('#right-bottom').supersleight();
	
	jQuery('#wrapper #left p:last').css("min-height", "25px");
	
//	jQuery("li.photo_item").hover(
//		function(){
//			jQuery('#submenu').removeClass('hidden');
//		},
//		function(){
//			jQuery('#submenu').addClass('hidden');
//		});

	jQuery("#gallery_next").hover(
		function(){
			jQuery('#gallery_next img').removeClass('hidden');
		},
		function(){
			jQuery('#gallery_next img').addClass('hidden');
		});

	jQuery("#gallery_prev").hover(
		function(){
			jQuery('#gallery_prev img').removeClass('hidden');
		},
		function(){
			jQuery('#gallery_prev img').addClass('hidden');
		});

	jQuery('#gallery').serialScroll({
		target:'#gallery_viewer',
		items:'li.photo', // Selector to the items ( relative to the matched elements, '#sections' in this case )
		prev:'#gallery_prev',// Selector to the 'prev' button (absolute!, meaning it's relative to the document)
		next:'#gallery_next',// Selector to the 'next' button (absolute too)
		axis:'x',// The default is 'y' scroll on both ways
		navigation:'#gallery_nav ul li a.nav_link',
		duration:800,// Length of the animation (if you scroll 2 axes and use queue, then each axis take half this time)
		force:true, // Force a scroll to the element specified by 'start' (some browsers don't reset on refreshes)
		easing: "easeInOutSine",
		constant: false
	});
	
	jQuery("li.photo a").fancybox({titleShow: false});

//	jQuery("li#left a img").mouseover(function () {
//	      $(this).effect("bounce", { times:3 }, 300);
//	});
	
	
});