jQuery(document).ready(function(){

$('p.btn a img')
  .mouseover(function(){
    var onSrc = $(this).attr('src').replace('.png', '_o.png');
    $(this).attr('src', onSrc);		
  })
  .mouseout(function(){
    var offSrc = $(this).attr('src').replace('_o.png', '.png');
    $(this).attr('src', offSrc);		
  });

$("#featureCarousel").featureCarousel({
// include options like this:
// (use quotes only for string values, and no trailing comma after last option)
// option: value,
// option: value
});

/* config - commentOut to Off */
cssBrowserSelector();
initRollOvers();
//	enableFlash();
//	enablePNG ();
//	blankLogToGoogle();
blankToPop();
smoothScroll();

/* each page function */
//	if(jQuery("body#PAGEID")[0]) {
//		/*PAGEID FUNCTION*/
//	};

$(".popup").click(function(){
newwindow=window.open($(this).attr('href'),'',"width=830,resizable=yes,scrollbars=yes,z-lock=yes,alwaysRaised=yes");
if (window.focus) {newwindow.focus()}
return false;
});

// Dropdown
$('#navi li').each(function(i){
  var hovObj = (i==99) ? $(this).children('a') : $(this).find('dt a');
  var subObj = (i==99) ? null : $(this).find('dd');

  $(this).hover(function(){
    if(!hovObj.hasClass('hov')){
      hovObj.addClass('hov');
      if(subObj!=null) subObj.slideDown('fast');
    }
  },function(){
    if(i==99){
      hovObj.removeClass('hov');
    }else{
      if(subObj!=null) subObj.slideUp('fast',function(){
        hovObj.removeClass('hov');
      });
    }
  });
});

// Read more
$('.switch').toggle(function(){
	$(this).html('<img src="/imgs/btn_jp2.png" />').siblings('.more').show().siblings('.leader').text(' ');
},function(){
	$(this).html('<img src="/imgs/btn_jp.png" />').siblings('.more').hide().siblings('.leader').text(' ');
});

});
