$(document).ready(function() {
 Cufon.replace('.blognames h1 a', {textShadow:'#000 1px 1px',fontSize: '78px'});
 $("#menu li a").prepend('<span class="lspan"><span class="rspan"></span></span>').append('<span class="line-box"><span class="lline"><span class="rline"></span></span></span>');
 function showItem(parent,url,hlclass){var ls=$(parent).find("a").get(),o=null,l=0;for(var j in ls){if(ls[j].href&&url.indexOf(ls[j].href)>=0){if (!o || l<ls[j].href.length){o=ls[j];l=ls[j].href.length;}}}if(o) $(o).addClass(hlclass);}
 showItem($('#menu')[0],document.location.href+'/','uMenuItemA') 
 $("#menu li").find('a').each(function () {
	if ($(this).hasClass('uMenuItemA')) {				
		} else {
    	var $span = $('span.lspan', this);
		var $line = $('span.line-box', this).css('opacity', 0);
 		$(this).hover(function () {
  			$span.stop().animate({bottom: '0px'}, 300);
  			$line.stop().animate({opacity: 1}, 700);
 		}, function () {
 			$span.stop().animate({bottom: '-51px'}, 300);
  			$line.stop().animate({opacity: 0}, 200);
 		});
	};
 });
 $("#casing").find('.eTitle').each(function () {
	 $(this).wrapInner('<div class="title-box"><div class="ltitle"><div class="rtitle"><span class="mtitle"></span></div></div></div>');
	 var $w = $(".mtitle", this).width();
	 var $t = $(".title-box", this);
	 $t.css({width:$w + 210, margin:"0 auto"}); 
 });
 $('#switcher').switcher();
 $("#switcher li").find('a').each(function () {
		var $a = $(this).css('opacity', 0.6);
 		$(this).hover(function () {
  			$a.stop().fadeTo(400, 1);
        }, function () {
            $a.stop().fadeTo(400, 0.6);
 		});
 });
});