(function(){
	this.TipKids = this.TipKids || {};

	TipKids.PROGRESS_IMAGE = "/api/shared/img/progress.gif";

	TipKids.loadMonthlyNews = function(target, shop_id, opt)
	{
		opt        = opt          || {};
		target     = $(target);

		ajaxOption   = opt.ajaxOption || {};
		data         = opt.data || {};
		data.shop_id = shop_id || this.shop_id || "";


		var defaultOption = {
			async  : true,
			cache  : false,
			timeout: 30 * 1000,
			type   : "GET",
			dataType: "html",
			data   : data,
			url    : "/api/get-news", // test
			success : function(result) {
				target.html(result).hide().fadeIn("fast");
			},
			error   : function() {
				target.html("error").hide().fadeIn("fast");
			}
		}

		target.html('<div style="text-align:center"><img src="' + this.PROGRESS_IMAGE + '" /></div>');
		$.ajax($.extend(defaultOption, ajaxOption));
	}

})();
