// ss.js

//---------------------------------------------
$.fn.ss = function(o)
	{
	var div = $(this);
	o.snds = new Dir("sounds", function(){div.ssInit(o);});
	}

$.fn.ssInit = function(o)
	{
		var t = o.gettotal();
		var i = 1;
		$(_img).attr("src", o.getsrc(i))
		.bind("mousedown", function(){
			
			$.sound.play(o.snds.randImg().file,{track:1,timeout:8000});
			if (i<t) ++i;
			else i=1;
			$(this).attr("src", o.getsrc(i));
		})
		.appendTo($(this));
	}