$(function(){
	var more_spec = $('#more_spec');
	var clearMoreSpec = function() {clearTimeout(more_spec.data('to'))}
	var mouseout = function(){
		clearTimeout(more_spec.data('to'));
		more_spec.data('to',setTimeout(function(){
			clearMoreSpec();
			more_spec.animate({width:0},'fast',function(){more_spec.hide()})},700));
	};
	more_spec.hover(clearMoreSpec,mouseout);
	$('#content-container div.goods-info').hover(function(){
		var t = $(this);
		clearMoreSpec();
		if ((more_spec.data('pp')==t.find('a:first').attr('href'))&&(more_spec.css('display')!='none')) {
			more_spec.stop().animate({width:31},'slow');
			clearMoreSpec();
			return true;
		}
		more_spec.data('pp',t.find('a:first').attr('href'));
		if (more_spec.css('display')=='none') {
			more_spec.css('width',0).css('display','block');
			var o = t.find('img').offset();
			o.left=t.offset().left+2;
			more_spec.css(o).stop();
			more_spec.animate({width:31},'slow');
		} else {
			more_spec.stop().animate({width:0},'fast',function(){
				more_spec.css('width',0).css('display','block');
				var o = t.find('img').offset();
				o.left=t.offset().left+2;
				more_spec.css(o).animate({width:31},'slow');
			});
		}

	},mouseout)
})
