//js photoshow相册
var theInt = null;
var curclicked = 0;

jQuery(function(){
//	jQuery('#thumbs img').click(function(){
//			t(jQuery('#thumbs img').index(this));
//			return false;
//	});
	t(0);
})

t = function(i){
	clearInterval(theInt);
	if( typeof i != 'undefined' ){curclicked = i;}
			jQuery('#this_photoshow img').fadeOut(0).fadeIn(1400).attr('src',jQuery('#thumbs img').eq(i).attr('href'));
			jQuery('#thumbs img').css('opacity','0.5');
			jQuery('#thumbs img').eq(i).css('opacity','1');
		
		var setIntervalFn = function (){
			i++;
			if (i > jQuery('#thumbs img').length - 1) {i = 0;}
			jQuery('#this_photoshow img').fadeOut(0).fadeIn(1400).attr('src',jQuery('#thumbs a').eq(i).attr('href'));
			jQuery('#thumbs img').css('opacity','0.5');
			jQuery('#thumbs img').eq(i).css('opacity','1');
		}
		theInt = setInterval(setIntervalFn,5000);
}

//幻灯效果
jQuery(document).ready(function($){	
	  var select = $('a[href$=".bmp"],a[href$=".gif"],a[href$=".jpg"],a[href$=".jpeg"], a[href$=".png"],a[href$=".BMP"],a[href$=".GIF"],a[href$=".JPG"],a[href$=".JPEG"],a[href$=".PNG"]');
		select.slimbox();
	});
