/**
		* cluetipによるツールチップ表示JavaScript
		*
		* HTMLのDOM構成
		* .js_cluetip_[識別]_trigger rel=#[ID] (1...N)  ツールチップを起動させるエレメント（aなど）
		*   .js_cluetip_[識別]_target id=[ID]  (1...N)  ツールチップの中身として表示されるエレメント
		*
		* @require jquery.js
		* @require jquery.bgiframe.js
		* @require jquery.cluetip.js
		*/

$(function(){

	//共通デフォルト設定
	$.extend($.fn.cluetip.defaults, {
		width:            275,
		height:           "auto",
		cluezIndex:       97,
		positionBy:       "auto",
		topOffset:        15,
		leftOffset:       15,
		local:            false,
		hideLocal:        true,
		attribute:        "rel",
		titleAttribute:   "title",
		splitTitle:       "",
		showTitle:        true,
		cluetipClass:     "default",
		hoverClass:       "",
		waitImage:        false,
		cursor:           "",
		arrows:           false,
		dropShadow:       false,
		dropShadowSteps:  6,
		sticky:           false,
		mouseOutClose:    false,
		activation:       "hover",
		clickThrough:     false,
		tracking:         false,
		delayedClose:     0,
		closePosition:    "top",
		closeText:        "Close",
		truncate:         0,
		debug:            false
	});

	//アイコンシンボル説明
	$(".cluetip_symbolpng").each(function(index){
		$(this).cluetip(
			//画像のsrcのgifをpngに変更したものを利用
			"<img src=\"" + $(this).attr("src").replace(/.gif$/, ".png") + "\" />",
			{
				positionBy:       "fixed",
				topOffset:        -35,
				leftOffset:       -30,
				splitTitle:       "#####",
				cluetipClass:     "symbolpng",
				onShow: function(cluetip, cluetipInner){
					//pngfix
					cluetipInner.find("img").load(function(){
						$(this).pngfix();
					});
				}
			}
		);
	});
});
