jQuery.fn.flashImg = function(userOptions){
	var _options = {
		//图片播放间隔,单位ms
		delay : 4000
		};
	_options = jQuery.extend(_options,userOptions);
	var _imageCon = jQuery('dt',this);
	var _titleCon = jQuery('dd div',this);
	var _linkCon = jQuery('cite',this);
	var _linkButtons = jQuery('a',_linkCon);
	var _linkNum = _linkButtons.length;
	var _timer = null;	
	var _curIndex = -1;
	var _filters = ['Barn|Blinds|CheckerBoard|Fade',
		'|GradientWipe|Inset|Iris|Pixelate',
		'|RadialWipe|RandomBars|RandomDissolve',
		'|Slide|Spiral|Stretch',
		'|Strips|Wheel|Zigzag|RevealTrans'].join('').split('|');
	function _initAll(){
		_imageCon.hide();
		_titleCon.hide();
		_linkButtons.removeClass('active');
		}
	function _show(index){
		var filter = _filters[Math.floor(Math.random()*_filters.length)];	
		var imgCon = _imageCon.eq(index).show().get(0);
		var imgel = jQuery('img',imgCon).get(0);
		var filterCon = imgCon;
		_titleCon.eq(index).show();
		_linkButtons.eq(index).addClass('active');	
		imgel.style.display = 'none';
		filterCon.style.width = '298px';	
		filterCon.style.visibility = 'visible';
		filterCon.style.filter = 'progid:DXImageTransform.Microsoft.'
			+ filter + '()';	
		try{
			filterCon.filters[0].apply();
			}catch(e){}
		imgel.style.display = 'block';		
		try{
			filterCon.filters[0].play();
			}catch(e){}	
		}	
	function _changeShow(toIndex){
		_curIndex = toIndex;
		_initAll();
		_show(toIndex);
		}
	function _stop(){
		clearInterval(_timer)
		}
	function _start(){
		_stop();
		_timer = setInterval(function(){
			var toIndex = ++_curIndex;
			if(toIndex>=_linkNum){
				toIndex = 0;
				}
			_changeShow(toIndex);
			},_options.delay);
		}
	function _clickHandler(e){
		this.blur();
		if(e.target.className == 'active'){
			return true;
			}
		else{
			_changeShow(e.data.index);
			return false;
			}	
		}	
	_linkCon.mouseover(function(){
		_stop();
		});
	_linkCon.mouseout(function(){
		_start();
		});
	_linkButtons.each(function(i,el){
		jQuery(el).bind('click',{index:i},_clickHandler);
		});	
	_initAll();
	_changeShow(0);
	_start();					
	};
	