﻿var photoCircleFlag=true;

jQuery(document).ready(function(){


$("#bigPhotoList li").click ( function(){
       
	var target = $(this).attr('name');	

	$('#bigPhoto .current').css('display','none');
	$('#bigPhoto .current').removeClass('current');
	$('#bigPhoto').find('a').eq(target).css('display','none');
	$('#bigPhoto').find('a').eq(target).addClass('current');
	$('#bigPhoto').find('a').eq(target).fadeIn(200);
	$('#bigPhotoList .active').removeClass('active');
	$(this).addClass('active');
 
	return true;
});

jQuery(".photoSlider").hover (
function(){
	photoCircleFlag=false;
},
function()
{
	photoCircleFlag=true;
});	


setInterval("fotoCircle()",5000);


});
function fotoCircle()
{
	
	if(photoCircleFlag == true)
	{
		if($('#bigPhotoList .active').next().is('li'))
		{
			$('#bigPhotoList .active').next().click();
		}
		else
		{
			$('#bigPhotoList').find('li').eq(0).click();
		}
	}
	return false;
}





