/**
 * @name main.js
 * @fileOverview
 * @version 1.1
 * @description
 * <p>(c) FOURDIGIT Inc. Licensed <a href="http://ja.wikipedia.org/wiki/GNU_General_Public_License">GNU General Public License</a>.</p>
 */

//他ライブラリと共存する場合、下の一行コメントアウト解除($無効化)
//jQuery.noConflict();

/**
 * config
 */
(function($){
	$(function() {
	//bodyのクラスにブラウザ情報を追加
		$.addClassUA();
	//easyOverのターゲット設定
		$("img.ahover, .ahoverArea img").easyOver();
	//IE5,6にてPNG有効化 (pngfixの読み込みが必要)
		$.autoEnablePNG();
	//Flash
		//$("object, embed").enableFlash();
  //HTML5タグ有効化
  		$.enableHTML5();
	//ポップアップリンクに置換
		$(".commonPop").easyPop();
	//他ドメインリンク時にpageTracker有効化
		//$("a,area").blankLogToGoogle();
	//アンカーリンクをスムージング
		//$("a[href^=#]").smoothScroll();
	//対象の要素をスクロールに追従するようにする
		//$("#fixBox").fixPosition("stopperID","normal");
	//対象の要素がopenerを判別して挙動を変える
		//$("a.moveOpener, area.moveOpener").moveOpener();
	//heightline
	  	$().heightline(".box");
	//キーワードボックス
		$('#keyword').each(function () {$tb = $(this);if ($tb.val() != this.title) {$tb.removeClass('gray');}});
		$('#keyword').focus(function () {$tb = $(this);if ($tb.val() == this.title) {$tb.val('');$tb.removeClass('gray');}});
		$('#keyword').blur(function () {$tb = $(this);if ($.trim($tb.val()) == '') {$tb.val(this.title);$tb.addClass('gray');}});
	//文字サイズ変換
		$(".text-resizer a")
		.attr('href', 'javascript:void(0);')
		.textresizer({
			target: "#center .date, #center .content, #center .box .content, #center .header .description, .box .image-btns .btns .name, .specs, #rightContentArea #right-content",
			type: "cssClass",
			sizes: [ "small-text", "medium-text", "large-text" ]
		});
	});
})(jQuery);
