$(document).ready(function(){
	// photoScroller
	/*var activeLiIndex = 0;
	var lis = $('#photoContainer li');
	function fadeInActiveLi() {
		$('#photoContainer li:eq('+activeLiIndex+')').fadeIn('normal', function(){
			$('#photoTitle').text($(this).find('img').attr('title'));
			$('#position').text($('#photoContainer li').index($(this))+1);
			$('#photoContainer li').not(this).fadeOut();
		});
		return false;
	}
	fadeInActiveLi();
	$('#next').click(function(){
		if (++activeLiIndex >= lis.length) activeLiIndex = 0;
		return fadeInActiveLi();
	});
	$('#prev').click(function(){
		if (--activeLiIndex < 0) activeLiIndex = lis.length - 1;
		return fadeInActiveLi();
	});*/

	// label hiding
	$('input.hideMyLabel[value!=""]').each(function(){
		$('label.hideMe[for='+$(this).attr('id')+']').hide();
	});
	$('input.hideMyLabel').focus(function() {
		$('label.hideMe[for='+$(this).attr('id')+']').hide();
	});
	$('input.hideMyLabel').blur(function() {
		if ($(this).val() == '') {
			$('label.hideMe[for='+$(this).attr('id')+']').show();
		}
	});

	// photo scroller
	$('#photoContainer').cycle({
		fx:			'fade',
		speed:		300,
		timeout:	3000,
		next:		'#next',
		prev:		'#prev',
		pause:   	1,
		after:		function(currSlideElement, nextSlideElement, options, forwardFlag) {
			$('#photoTitle').text($(currSlideElement).find('img').attr('title'));
			$('#photoCount').text($('#photoContainer li').index(currSlideElement)+1+'/'+$('#photoContainer li').length);
		}
	});

	//lightbox
	$('.lightbox').lightBox();
});