// these example method has to be implemented by fully functional methods

EXAMPLE_RATED = false;

$.extend(RatingManager, {

	rate: function(grade) {
		// do something
		if (EXAMPLE_RATED) {
			RatingManager.displayError(_.rating.error);
			EXAMPLE_RATED = false;
		} else {
			RatingManager.displaySuccess(_.rating.success, grade);
			EXAMPLE_RATED = true;
		}
	}

});

$.extend(LocationSelector.prototype, {

	getContent: function() {
		var content = '\
			<div id="location-selector" style="width: 140px; ">\
				<p id="location-selector-close-handle" style="background-image: url(_resources/img/en/roche-worldwide.gif); width: 96px; ">\
					<span class="access">Roche Worldwide</span>\
				</p>\
			    <div class="slider"><div class="handle ui-slider-handle"></div></div>\
			    <div id="location-list-wrapper">\
					<ul>' + this.getCountrylistAsHtml() + '\
					</ul>\
				</div>\
			</div>';
		$("a#location-selector-handle").parent().append(content);
		this.toggleWith("p#location-selector-close-handle");
		return $("div#location-selector");
	},

	getCountrylistAsHtml: function() {
		var list = [];
		for (var i in _.countries) {
			list.push('<li><a href="javascript:void(0);">' +  _.countries[i] + '</a></li>');
		}
		return list.join("");
	}

});
