
jQuery(document).ready(function(){
    
    
    /*********************************** fb.wall start ***********************************/
    if($('#info').size() > 0){
        $('#fbwall').fbWall({
            id:'309964832348193',
            accessToken:'136236016495276|ZXmUG5RrKqDi9QSqA-h9ocKJN6Q',
            showGuestEntries:false, // 自分以外の人を表示するかどうか
            showComments:true, // コメントを表示するか
            max:8, // 表示数
            timeConversion:24, // 時間の表記、12の場合はamとpmが表示される
            // アバターを設定する場合は画像のパスを入力する
            useAvatarAlternative:'images/avatar-alternative.jpg', // 自分のアバターを統一するか
            useAvatarExternal:false, // 他の人のアバターを統一するか
            translateLikeThis:'がいいね！といっています。', // 2人以上が、いいねを押している時
            translateLikesThis:'さんがいいね！といっています。', // 1人だけが、いいねを押している時
            translateAt:'時刻', // 日付と時刻の間の at を置き換える
            translateErrorNoData:'エラー', // エラーのときの表示
            translatePeople:'人' // 5 people の people部分を換える
        });
    }
    /*********************************** fb.wall end ***********************************/
    
    // リンク切れ画像を置換
    $('img').error(function(){
        $(this).attr({src:'http://gettys.co.jp/wp-content/themes/gettys/img/transparent.gif'});
    });
    
    // page top scroll animation    
    $.easing.quart = function (x, t, b, c, d) {if ((t/=d/2) < 1) return c/2*t*t*t*t + b;return -c/2 * ((t-=2)*t*t*t - 2) + b;};
    $('.page-top').click(function () {
        $(this).blur();
        $('html,body').animate({ scrollTop: 0 }, 300, 'quart');
        return false;
    });
    
    
    // jquery.jrumble.1.3.min.js
    if($('#call').size() > 0){
        $('#call').jrumble({
            speed: 50
        });
        $('#call').hover(function(){
            $(this).trigger('startRumble');
        },function(){
            $(this).trigger('stopRumble');
        });
    }
    
    
    
});
