function GetXMLHttp() {
if(navigator.appName == "Microsoft Internet Explorer") {
xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
}
else {
xmlHttp = new XMLHttpRequest();
}
return xmlHttp;
}

var xmlRequest = GetXMLHttp();

jQuery.noConflict();
jQuery(document).ready(function() {
	

	jQuery("[id^=rating_]").hover(function() {


		rid = jQuery(this).attr("id").split("_")[1];
		jQuery("#rating_"+rid).children("[class^=star_]").children('img').hover(function() {

			jQuery("#rating_"+rid).children("[class^=star_]").children('img').removeClass("hovervoto");

			/* The hovered item number */
			var hovered = jQuery(this).parent().attr("class").split("_")[1];
	
			while(hovered > 0) {
				jQuery("#rating_"+rid).children(".star_"+hovered).children('img').addClass("hovervoto");
				hovered--;
			}

		});
	});

	jQuery("[id^=rating_]").children("[class^=star_]").click(function() {

		
		var current_star = jQuery(this).attr("class").split("_")[1];
		var rid = jQuery(this).parent().attr("id").split("_")[1];

		jQuery('#rating_'+rid).load('send.php', {rating: current_star, id: rid});

	});




});


