//document.write('<style tyle="text/css">#container #content #main ul li p.pic img , .blog #container #content #main #entry #entrybody p img , #sub #entrylist {display:none;}</style>');

$(function(){

//変数定義ここから
$id = $('body').attr('id');
$class = $('body').attr('class');
$class = $class.split(' ');
$class = $class[0];
if($class == undefined){
	$class = $('body').attr('class');
	$class = $class.split(' ');
	$class = $class[1];
}
//変数定義ここまで


if($('body').attr('class').search('management') != -1){
$('table tbody tr').children().hover(function(){
$(this).addClass('active');
$(this).siblings().addClass('active');
},function(){
$(this).removeClass('active');
$(this).siblings().removeClass('active');
});
}

if($id == 'mail'){
$(':checked').each(function(){
	$(this).parents('td').addClass('checked');
});

$(':checkbox').click(function(){
if($(this).parents('td').hasClass('checked')){
$(this).parents('td').removeClass('checked');
} else {
$(this).parents('td').addClass('checked');
}
});
}

if($id == 'info' || $class == 'administration' && $id == 'index'){
$('.section ul li dl dt a').hover(function(){
	$(this).parents('dl').addClass('over');
},function(){
	$(this).parents('dl').removeClass('over');
});
}


$('#pagetop').click(function(){
$((navigator.userAgent.indexOf('Opera') != -1) ? document.compatMode == 'BackCompat' ? 'body' : 'html' : 'html,body').animate({scrollTop:0},'normal');
return false;
}); 

$('.blank').click(function(){
var ua = $.browser;

if(ua.msie){
	window.open($(this).attr('href') , '' , 'width=0 , height=0 , resizable=no , scrollbars=yes');
}
else {
	window.open($(this).attr('href') , '' , 'width=0 , height=0, resizable=no , scrollbars=yes');
}
return false;
});

$('a.help').click(function(){
var ua = $.browser;

if(ua.msie){
window.open($(this).attr('href') , '' , 'width=563 , height=633, resizable=no , scrollbars=yes');
}
else {
window.open($(this).attr('href') , '' , 'width=563 , height=633, resizable=no , scrollbars=yes');
}
return false;
});

if($id == 'plan'){
$('p.pic a').click(function(){
var ua = $.browser;

if(ua.msie){
window.open($(this).attr('href') , '' , 'width=691 , height=633, resizable=no , scrollbars=yes');
}
else {
window.open($(this).attr('href') , '' , 'width=691 , height=633, resizable=no , scrollbars=yes');
}
return false;
});
}

});

