
/* 00.Function - Debug
=========================================================== */
function jquery_dump($obj) {
	var dumphtml = [];
	if($.browser.msie) {
		for(var i = 0; i < $obj.length; i++) {
			dumphtml.push('[' + i + '] ');
			dumphtml.push($obj[i].outerHTML.replace(/^[\r\n\t]+/, ''));
			dumphtml.push("\n");
		}
	} else {
		for(var i = 0; i < $obj.length; i++) {
			dumphtml.push('[' + i + '] '
				+ '<' + $obj[i].nodeName.toLowerCase());
			for(var j = 0; j < $obj[i].attributes.length; j++) {
				dumphtml.push(' ' + $obj[i].attributes[j].nodeName + '="' 
					+ $obj[i].attributes[j].nodeValue + '"');
			}
			dumphtml.push('>' + $obj[i].innerHTML);
			dumphtml.push('<\/' + $obj[i].nodeName.toLowerCase() + '>');
			dumphtml.push("\n");
		}
	}
	alert(dumphtml.join(''));
}

/* 01.Function - Onload
=========================================================== */
$(function(){

	//ターゲットブランク
	$("a.blank").click(function(){
		window.open(this.href);
		return false;
	});

	//イベント情報

	if($("a.fancys3")[0]){
		$("a.fancys3").fancybox({
			'width'				: 616,
			'height'			: 695,
			'overlayColor' : '#000',
			'autoScale'			: true,
			'transitionIn'		: 'none',
			'transitionOut'		: 'none',
			'type'				: 'iframe',
			'scrolling':'auto',
			'showCloseButton':true,
			'padding' : 0
		});

	}
	
	//ロールオーバー
	function rollOver(){
		var preLoad = new Object();
		$('img.rollOver,input.rollOver').not("[src*='_on.']").each(function(){
			var imgSrc = this.src;
			var fType = imgSrc.substring(imgSrc.lastIndexOf('.'));
			var imgName = imgSrc.substr(0, imgSrc.lastIndexOf('.'));
			var imgOver = imgName + '_on' + fType;
			preLoad[this.src] = new Image();
			preLoad[this.src].src = imgOver;
			$(this).hover(
				function (){
					this.src = imgOver;
				},
				function (){
					this.src = imgSrc;
				}
			);
		});
	}
	
	//プリロード
	function preLoadImages() {
	  for (var i = 0, I = arguments.length; i < I; ++i) {
		new Image().src = arguments[i];
	  }
	}
	
	//ロールオーバー（フェード）
	$(".fade").each(function () {
        $(this).hover(function () {
            $(this).stop(true, false).fadeTo(100, 0.5);
        }, function () {
            $(this).stop(true, false).fadeTo(100, 1.0);
        })
    })
});


