//@charset "utf-8";
//onload---------------------------
//window.onload=function(){}


$(document).ready(function() {

//すべてのspanに角丸を
in_round();

//すべてのh2をチェック
check_h2();


//ループさせる setInterval("loop()",330);

});
//onload---------------------------

//すべてのh2をチェック
function check_h2(){
var tag_h2=tag_name(document,"h2");

var no_array=new Array();

/*
for(i=0;i<tag_h2.length;i++){
if(tag_h2[i].parentNode.nodeName!="SPAN"){
no_array.push(i);
}//if	
}//for	
for(i=0;i<no_array.length;i++){
if(i%3==0){
tag_h2[no_array[i]].style.fontWeight="bold"
	}if(i%3==1){
tag_h2[no_array[i]].style.color="#c00"
tag_h2[no_array[i]].style.fontWeight="bold"
	}if(i%3==2){
tag_h2[no_array[i]].style.color="#00c"
tag_h2[no_array[i]].style.fontWeight="bold"
	}
	}//for

*/
}//function check_h2(){


//ループさせる
function loop(){
	
	container_size();
	
	}
//containerの大きさ維持
function container_size(){
	var container=byid("container");
	var tag_body=tag_name(document,"body")[0];
	
	var window_size=$(window).width();
	
	if(window_size<=1014){
		tag_body.style.padding="0 20px";
		container.style.width="860px";
		}else{
			tag_body.style.padding="0";
		container.style.width="95%";
			}
	}


//すべてのspanに角丸を
function in_round(){
var tag_span=tag_name(document,"span");

for(i=0;i<tag_span.length;i++){
var make_div=tag_make("div");
with(make_div.style){
	background="url(img/back/bottom_r.gif) bottom right no-repeat #eee"
	textAlign="left";
	height="5px";
	}//with
var bottom_l=tag_make("img");
bottom_l.setAttribute("src","img/back/bottom_l.gif");
make_div.appendChild(bottom_l);
tag_span[i].appendChild(make_div);


var tag_h2=tag_name(tag_span[i],"h2");
for(q=0;q<tag_h2.length;q++){
var make_div=tag_make("div");
with(make_div.style){
	background="url(img/back/top_r.gif) bottom right no-repeat #5998dd"
	textAlign="left";
	height="5px";
	}//with
var bottom_l=tag_make("img");
bottom_l.setAttribute("src","img/back/top_l.gif");
make_div.appendChild(bottom_l);
tag_span[i].insertBefore(make_div,tag_span[i].firstChild);
}//for


}//for



}



//省略_start------------------------------------------

//id省略
function byid(id){
return document.getElementById(id);
}

//タグ生成
function tag_make(tag){
return document.createElement(tag);
}

//タグ指定
function tag_name(name1,tag){
return name1.getElementsByTagName(tag);
}

//テキスト生成
function text_make(text){
return document.createTextNode(text);
}

//動作判別 if(!byid(" ")) return false;

//乱数の取得　0から5を取得なら randnum_no(0,6)
function randnum_no(min_no,max_no){
var randnum = min_no + Math.floor( Math.random() * max_no );
return randnum;
}

//現在のアドレス取得
var now_url=window.location.href;

//階層変更に対応するpass抽出関数
//使用時は　var pass_text=pass_text(仕切り文字。scriptのパスがjs/script.jsだったら"js/")

function pass_text(split_text){
var temp_pass=tag_name(document,"script")[0].getAttribute("src").split(split_text);
return temp_pass[0]
}


//日付取得関連
var now=new Date();//現在の時間を取得
var year=now.getFullYear();//4桁の西暦年数を返します
var month=now.getMonth()+1;//月
var date=now.getDate();//日

//日付を20080101の形式で取得
var now_date=now_date()

function now_date(){
var now=new Date();
var month=in_func(now.getMonth()+1);
var date=in_func(now.getDate());

return now.getFullYear()+month+date

function in_func(n){if(n<10){n=""+0+n;return n;}else{n=""+n;return n;}}
	}//now_date()の閉め

//省略_end------------------------------------------


