// JavaScript Document
$(function(){
$('ul.nav li').each(function(){
var h = $(this).find('.sub').height();
$(this).find('ins').height(h);
});

$('ul.nav li').hover(function(){
$(this).find('a').addClass('hover')
$(this).find('.sub').slideDown(300)
},function(){
$(this).find('.sub').slideUp(200,function(){
setTimeout(function(){$('ul.nav li a').removeClass('hover')},100)
})
});

$(".b1").scrollable({size:3,items:".b1 ul",loop:true,prevPage:".arr_l",nextPage:".arr_r"}).autoscroll({ autoplay: true,interval:4000 });

$(".b2").scrollable({size:3,items:".b2 ul",loop:true,prevPage:".arr_l2",nextPage:".arr_r2"}).autoscroll({ autoplay: true,interval:4000 });

$(".b3").scrollable({size:1,items:".b3 ul",loop:true,vertical:true}).autoscroll({ autoplay: true,interval:4000 });

$("a.arr_l,a.arr_r,a.arr_l2,a.arr_r2").click(function(){return false});

if( $(".rside").height()<$(".lside").height() )
{$(".rside").height($(".lside").height())}
else
{$(".lside").height($(".rside").height())};

$(".nl li:last,.sl li:last").addClass("n");

$(".odb input.s").hover(function(){
$(this).toggleClass("shover")
})

var fl=getFileName();

if( fl=="" || fl=="index.php" )
{

}
else
{
	$(window).scrollTop($(".main").offset().top);	
}

});

function getFileName(){
var url = this.location.href
var pos = url.lastIndexOf("/");
if(pos == -1){
   pos = url.lastIndexOf("\\")
}
var filename = url.substr(pos +1)
return filename;
}
