//TOPスクロール
function UpdateTableHeaders() {
$("#l-content").each(function() {
var el             = $(this),
offset         = el.offset(),
scrollTop      = $(window).scrollTop(),
floatingHeader = $(".floatingHeader", this)

if ((scrollTop > offset.top) && (scrollTop < offset.top + el.height())) {
floatingHeader.css({"visibility": "visible"});
} else {
floatingHeader.css({
"visibility": "hidden"
});
};
});
}

$(function() {
var clonedHeaderRow;
$("#l-content").each(function() {
clonedHeaderRow = $(".ni", this);
clonedHeaderRow
.before(clonedHeaderRow.clone())
.css("width", clonedHeaderRow.width())
.addClass("floatingHeader");
});

$(window)
.scroll(UpdateTableHeaders)
.trigger("scroll");

});


//TOPニュースブリンク
$(function() {
setInterval(function() {
$(".blink").is(":hidden") ? $(".blink").fadeIn() : $(".blink").fadeOut();
}, 500);
});

//TOPスクロール
$(document).ready(function(){

// hide #back-top first
$("#back-top").hide();

// fade in #back-top
$(function () {
$(window).scroll(function () {
if ($(this).scrollTop() > 100) {
$('#back-top').fadeIn();
} else {
$('#back-top').fadeOut();
}
});

// scroll body to 0px on click
$('#back-top a').click(function () {
$('body,html').animate({
scrollTop: 0
}, 800);
return false;
});
});

});


//IE6用のメッセ
$(function () {
if ( $.browser.msie && $.browser.version <= 6 ) {
$('body').prepend('<div class="error">あなたは旧式ブラウザをご利用中です。このウェブサイトを快適に閲覧するにはブラウザをアップグレードしてください。</div>');
}
});
//メールフォーム関連
$(function(){
$("#mail-b-h #wrapper > article > section dl input,#mail-b-h #wrapper > article > section dl textarea").focus(function(){
$(this).css("background","#DFEEFF");
}).blur(function(){
$(this).css("background","");
})
})


$(function(){

$("#mail-b-h input").val("入力してください").one("focus",function(){
$(this).val("").css("color","#000");
}).blur(function(){
if($(this).val()==""){
$(this).val("入力してください").one("focus",function(){
$(this).val("").css("color","#000");
});
}
});
});

//写真関連

$(function(){
jQuery(document).ready(function($) {
$('a[rel*=facebox]').facebox()
}) 

jQuery(function() {
jQuery('#photo-b-h article h1+article ul').css("display","block");
jQuery('#photo-b-h article section article dl').css("opacity","0.2");  
jQuery('#photo-b-h article h1+article dl').css("opacity","1.0");
jQuery('#photo-b-h article section article dl').click(function() {
jQuery('#photo-b-h article section article ul').hide(); 
jQuery('#photo-b-h article section article dl').css("opacity","0.2");    
jQuery('ul',$(this).css("opacity","1.0").parent()).fadeIn('slow');
});
$("#photo-b-h article section article dl").hover(function(){
$(this).fadeTo("normal", 1.0); // マウスオーバーで透明度を60%にする
},function(){
$(this).fadeTo("normal", 0.2); // マウスアウトで透明度を100%に戻す

});
});

jQuery(document).ready(function($) {
$('a[@href$=".jpg"], a[@href$=".gif"], a[@href$=".png"], a[rel*=facebox]').facebox()
})
});
//musicページの右側動作
$(function(){
$("#geki9").css("display","block");
$("#open9")
.css("text-decoration","none").css("text-shadow","0 0 2px #FFFFFF").css("cursor","text");
$("#open9").click(function(){
$("#musicworks-bh #wrapper article section article div").slideUp();
$("#geki9").slideDown("slow");
$("#m-l-te li")
.css("text-decoration","underline").css("text-shadow","1px 1px 0 #093333").css("cursor","pointer");
$("#open9")
.css("text-decoration","none").css("text-shadow","0 0 2px #FFFFFF").css("cursor","text");
});
});
$(function(){
$("#open8").click(function(){
$("#musicworks-bh #wrapper article section article div").slideUp();
$("#geki8").slideDown("slow");
$("#open8").css("text-decoration","none");
$("#m-l-te li")
.css("text-decoration","underline").css("text-shadow","1px 1px 0 #093333").css("cursor","pointer");
$("#open8")
.css("text-decoration","none").css("text-shadow","0 0 2px #FFFFFF").css("cursor","text");
});
});
$(function(){
$("#open7").click(function(){
$("#musicworks-bh #wrapper article section article div").slideUp();
$("#open7").css("text-decoration","none");
$("#geki7").slideDown("slow");
$("#m-l-te li")
.css("text-decoration","underline").css("text-shadow","1px 1px 0 #093333").css("cursor","pointer");
$("#open7")
.css("text-decoration","none").css("text-shadow","0 0 2px #FFFFFF").css("cursor","text");
});
});
$(function(){
$("#open6").click(function(){
$("#musicworks-bh #wrapper article section article div").slideUp();
$("#open6").css("text-decoration","none");
$("#geki6").slideDown("slow");
$("#m-l-te li")
.css("text-decoration","underline").css("text-shadow","1px 1px 0 #093333").css("cursor","pointer");
$("#open6")
.css("text-decoration","none").css("text-shadow","0 0 2px #FFFFFF").css("cursor","text");
});
});
$(function(){
$("#open5").click(function(){
$("#musicworks-bh #wrapper article section article div").slideUp();
$("#open5").css("text-decoration","none");
$("#geki5").slideDown("slow");
$("#m-l-te li")
.css("text-decoration","underline").css("text-shadow","1px 1px 0 #093333").css("cursor","pointer");
$("#open5")
.css("text-decoration","none").css("text-shadow","0 0 2px #FFFFFF").css("cursor","text");
});
});
$(function(){
$("#open4").click(function(){
$("#musicworks-bh #wrapper article section article div").slideUp();
$("#open4").css("text-decoration","none");
$("#geki4").slideDown("slow");
$("#m-l-te li")
.css("text-decoration","underline").css("text-shadow","1px 1px 0 #093333").css("cursor","pointer");
$("#open4")
.css("text-decoration","none").css("text-shadow","0 0 2px #FFFFFF").css("cursor","text");
});
});
$(function(){
$("#open3").click(function(){
$("#musicworks-bh #wrapper article section article div").slideUp();
$("#open3").css("text-decoration","none");
$("#geki3").slideDown("slow");
$("#m-l-te li")
.css("text-decoration","underline").css("text-shadow","1px 1px 0 #093333").css("cursor","pointer");
$("#open3")
.css("text-decoration","none").css("text-shadow","0 0 2px #FFFFFF").css("cursor","text");
});
});
$(function(){
$("#open2").click(function(){
$("#musicworks-bh #wrapper article section article div").slideUp();
$("#open2").css("text-decoration","none");
$("#geki2").slideDown("slow");
$("#m-l-te li")
.css("text-decoration","underline").css("text-shadow","1px 1px 0 #093333").css("cursor","pointer");
$("#open2")
.css("text-decoration","none").css("text-shadow","0 0 2px #FFFFFF").css("cursor","text");
});
});
$(function(){
$("#open1").click(function(){
$("#musicworks-bh #wrapper article section article div").slideUp();
$("#open1").css("text-decoration","none");
$("#geki1").slideDown("slow");
$("#m-l-te li")
.css("text-decoration","underline").css("text-shadow","1px 1px 0 #093333").css("cursor","pointer");
$("#open1")
.css("text-decoration","none").css("text-shadow","0 0 2px #FFFFFF").css("cursor","text");
});
});




onload = function() {
  draw1();
};
/* fillRect()̗ */
function draw1() {
  var canvas = document.getElementById('c1');
  if ( ! canvas || ! canvas.getContext ) { return false; }
  var ctx = canvas.getContext('2d');
  ctx.beginPath();

  
  
ctx.fillRect(40, 40, 20, 80);

var rad = 45 * Math.PI / 180;
ctx.setTransform(Math.cos(rad), Math.sin(rad), -Math.sin(rad), Math.cos(rad), 0, 0 );
ctx.fillRect(88, 11, 60, 20);

var rad = 120 * Math.PI / 180;
ctx.setTransform(Math.cos(rad), Math.sin(rad), -Math.sin(rad), Math.cos(rad), 0, 0 );
ctx.fillRect(-10, -100, 50, 20);
  
var rad = 10 * Math.PI / 180;
ctx.setTransform(Math.cos(rad), Math.sin(rad), -Math.sin(rad), Math.cos(rad), 0, 0 );
ctx.fillRect(120, 90, 40, 10);

var rad = 0 * Math.PI / 180;
ctx.setTransform(Math.cos(rad), Math.sin(rad), -Math.sin(rad), Math.cos(rad), 0, 0 );
ctx.fillRect(130, 90, 20, 40);

var rad = 0 * Math.PI / 180;
ctx.setTransform(Math.cos(rad), Math.sin(rad), -Math.sin(rad), Math.cos(rad), 0, 0 );
ctx.fillRect(100, 90, 15, 50);

var rad = 2 * Math.PI / 180;
ctx.setTransform(Math.cos(rad), Math.sin(rad), -Math.sin(rad), Math.cos(rad), 0, 0 );
ctx.fillRect(160, 40, 15, 80);

var rad = 0 * Math.PI / 180;
ctx.setTransform(Math.cos(rad), Math.sin(rad), -Math.sin(rad), Math.cos(rad), 0, 0 );
ctx.fillRect(160, 45, 50, 10);

var rad = 0 * Math.PI / 180;
ctx.setTransform(Math.cos(rad), Math.sin(rad), -Math.sin(rad), Math.cos(rad), 0, 0 );
ctx.fillRect(160, 70, 50, 15);

var rad = 1 * Math.PI / 180;
ctx.setTransform(Math.cos(rad), Math.sin(rad), -Math.sin(rad), Math.cos(rad), 0, 0 );
ctx.fillRect(190, 45, 20, 35);

var rad = 120 * Math.PI / 180;
ctx.setTransform(Math.cos(rad), Math.sin(rad), -Math.sin(rad), Math.cos(rad), 0, 0 );
ctx.fillRect(-30, -240, 20, 35);

}




