/**
 * @fileOverview *************************
 * @version 0.0.5
 */
/* ----------------------------------------------------------------------------------- */


/**
 * @namespace 
 */
var MYX = {};


MYX.previewWindowName = "ContentPrintPreviewWindow";


/* ----------------------------------------------------------------------------------- */

$(function() {

	/* for IE6 background image flicker */
	if (jQuery.browser.msie && jQuery.browser.version == 6) {
		try {
			document.execCommand("BackgroundImageCache", false, true);
		} catch(err) {}
	}

	/* Setup RolloverImages */
	var roi = new RolloverImages('rollover', 'on');

	/* Setup MYX  */
	for (module in MYX) {
		var obj = MYX[module];
		if (obj && typeof obj == "function") {
			new MYX[module]();
		}
	}

});

/* ----------------------------------------------------------------------------------- */

/* ----------------------------------------------------------------------------------- */

MYX.SearchPlaceholder = function () {

	this.d_fcolor = "#999999";

	this.fcolor = "#333333";

	this.formData = [
						{
							target : "#inputSearchText",
							defaultKeyword : "サイト内検索"
						}
					];
//	if () {
		 this.init(); 
//	}
}

MYX.SearchPlaceholder.prototype.init = function () {
	var _this = this;
	$.each(_this.formData, function (i) {
		var d_key = this.defaultKeyword;
		$(this.target).each(function () {
			var el = $(this);
			el.css({"color" : _this.d_fcolor})
				.attr({"value"  : d_key});

			el.focus(function () {
				if (el.attr("value") == d_key) {
					el.attr({"value" : ""});
				}
				el.css({"color" : _this.fcolor});
			});

			el.blur(function () {
				if (el.attr("value") == "") {
					el.css({"color" : _this.d_fcolor})
						.attr({"value"  : d_key});
				}
			});
		});

	});




/* ----------------------------------------------------------------------------------- */
};

