var html = '';

// サイト初期設定
$(function() {

//	// Google外部リンク
//	jQuery.each($('a.blank[href^="http:"], a.blank[href$=".pdf"]'), function() {
//		var url = $(this).attr('href').replace('http://', '');
//		$(this).click( function () { pageTracker._trackPageview('/outgoing/' + url); });
//	});

	// リンクの点線除去
	$("a").focus( function(){ if(this.blur)this.blur(); });

	// 別窓
	$('a.blank').click(function(){ this.target = "_blank"; });

	// 画像ロールオーバー(置換)
	$('img.imgover').rollover('_on');
	// 画像ロールオーバー(点滅)
	$('img.imgfade').mouseover(function () {
		$(this).animate({opacity:'0.6'}, {duration: "slow"} );
		$(this).animate({opacity:'1.0'}, {duration: "normal"});
	});
	// 背景設定
	$('.imgback').each(function(){
		$(this).css('background', 'url("' + $(this).attr('src') + '") no-repeat');
	});

	// 小窓
	var winconfig = { mapwin: { height:700, width:800, center:1, resizable:0 } };
	$('a.popwin').popupwindow(winconfig);

	// 角丸
	$('.round').corner();

	// メールアドレス inc/system.php->get_asciiとセットで使用
	$('.mail_link').each(function(){
		var ascii = $(this).attr('rel');
		var code = ascii.split(',');
		var mail = "";
		for (var cnt=0; cnt<code.length; cnt++) {
			mail += String.fromCharCode(code[cnt]);
		}
		$(this).attr('href', 'mailto:' + mail);
		$(this).text(mail);
	});

//	$('.two_column').each(function(){
//		var point = parseInt($('li', this).size() / 2);
//		var remnants = $('li', this).size() % 2;
//		if (remnants > 0) point++;
//
//		point -= 1;
//		html = '<ul class="fl-l w250">';
//		$('li:gt(' + point + ')', this).each(addLi);
//		html += '</ul>';
//		$(this).after(html);
//
//		point += 1;
//		html = '<ul class="fl-l w250">';
//		$('li:lt(' + point + ')', this).each(addLi);
//		html += '</ul>';
//		$(this).after(html);
//
//		$(this).remove();
//	});
//
//	$('.three_column').each(function(){
//		var point = parseInt($('li', this).size() / 3);
//		var remnants = $('li', this).size() % 3;
//		if (remnants > 0) point++;
//
//		var epoint = point * 2 - 1;
//		html = '<ul class="fl-l w150">';
//		$('li:gt(' + epoint + ')', this).each(addLi);
//		html += '</ul>';
//		$(this).after(html);
//
//		var spoint = point - 1;
//		html = '<ul class="fl-l w200">';
//		$('li:gt(' + spoint + '):lt(' + point + ')', this).each(addLi);
//		html += '</ul>';
//		$(this).after(html);
//
//		point = point;
//		html = '<ul class="fl-l w200">';
//		$('li:lt(' + point + ')', this).each(addLi);
//		html += '</ul>';
//		$(this).after(html);
//
//		$(this).remove();
//	});

});

function addLi () {
	html += '<li>' + $(this).html() + '</li>';
}


