define(function (require, exports, module){
	var $ = require("jq"),
		starOnUrl = "",
		starOffUrl = "";
	function init(e){
		starOnUrl = "icon-star-full text-warn";
		starOffUrl = "icon-star-empty text-white";
		initEvents($("#" + e));
	}
	exports.init = init;

    function initEvents(e){
    	e.find("a").on("mouseover", function(){
    		toggle_stars(e.attr("data-star-set-id"), $(this).index() + 1);
    	});
      $(".stars", ".rating-container").on("mouseleave", function(t){
        var n;
        return n = $(t.currentTarget), reset_stars(n.attr("data-star-set-id"), n.attr("data-rating"))
      })
    }
    function toggle_stars(e, t) {
      var n, r, i, s;
      s = [];
      for(r = i = 1; i <= 5; r = ++i) n = "" + e + "_" + r, r > t ? s.push(turn_off_star(n)) : s.push(turn_on_star(n));
      return s
    }
    function turn_on_star(e) {
      return $("#" + e).attr("class", starOnUrl)
    }
    function turn_off_star(e) {
      return $("#" + e).attr("class", starOffUrl)
    }
    function reset_stars(e, t) {
      return toggle_stars(e, t)
    }
});