

if (typeof(wsVote)=='undefined') {


var wsVote = {};
wsVote.vote = function(sid,instance_id,v) {
	$.get('/modules/wsVote/ajaxapplication.php?op=vote&s='+sid+'&i='+instance_id+'&v='+v,wsVote.vote_cb);
	
}

wsVote.vote_cb = function(data) {
	var matches = data.match(/OK:([0-9]+):([0-9]+)/);
	if(matches) {
		$('.wsVoteElement_'+matches[1]).load('/modules/wsVote/ajaxapplication.php?op=result&i='+matches[1]+'&s='+matches[2]);
	} 
}
}
