(function($){
    $.fn.extend({
        subMenu: function(){
            return $(this).each(function(){
                $(this).hover(function(){
                    $('#'+this.id+'_in').css({top:'24px'});
                    $(this).addClass('hover');
                }, function(){
                    $('#'+this.id+'_in').css({top:'-8000em'});
                    $(this).removeClass('hover');
                })
            });
        },
        popup_uc: function(){
            return $(this).each(function(){
                $(this).CreateBubblePopup({
                    position: 'right',
                    align: 'top',
                    tail: {align: 'top'},
                    innerHtml: 'ページ作成中につき、表示出来ません。<br />もうしばらくお待ち下さい。',
                    themeName: 'orange',
                    themePath: '/css/jquerybubblepopup-theme',
                    alwaysVisible: false,
                    closingDelay: 200
                });
            });
        },
        popup_rc: function(){
            return $(this).each(function(){
                $(this).CreateBubblePopup({
                    position: 'right',
                    align: 'top',
                    tail: {align: 'top'},
                    innerHtml: 'ページ作成中につき、表示出来ません。<br />旧サイトのページにリンクします。',
                    themeName: 'orange',
                    themePath: '/css/jquerybubblepopup-theme',
                    alwaysVisible: false,
                    closingDelay: 200
                });
            });
        }
    });
    $(function(){
        $('.show-submenu').subMenu();
        $('.under-construction').popup_uc();
        $('.recent-content').popup_rc();
    });
})(jQuery);

