$(function(){

// <a>タグの前に「＞＞」を追加
	$(".content a:not(.noicon, h2 a, h3 a, .page_top a, .book_apply a, .book_law a, .prev a, .next a, .edit a, table.book_list a, table.link a, .news_title a, a[href^='mailto:'], a[href$='.pdf'], a[href$='.jpg'], a[href$='.gif'], a[href$='.png'])").prepend(
		'<img alt="" width="25" height="15" src="http://www.akk-jp.asia/wp-content/themes/akk/images/a.gif" />&nbsp;'
	);
	$(".content_top .detail a:not(.edit a)").prepend(
		'<img alt="" width="25" height="12" src="http://www.akk-jp.asia/wp-content/themes/akk/images/a_top.gif" />'
	);
});

$(function(){

// <a>タグのtarget属性とアイコン追加
    $("a[href^='http://']").attr("target", "_blank");
    $("a[href^='https://']").attr("target", "_blank");
    $("a[href^='http://www.akk-jp.asia']:not(a[href^='http://www.akk-jp.asia/wp-'])").removeAttr("target");

    $("a[href$='.pdf']").attr("target", "_blank");
});

// Easingの追加  
jQuery.easing.quart = function (x, t, b, c, d) {  
    return -c * ((t=t/d-1)*t*t*t - 1) + b;  
};  

jQuery(document).ready(function(){
    jQuery('a[href^=#]').click(function() {
        if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) {
            var $target = jQuery(this.hash);
            $target = $target.length && $target || jQuery('[name=' + this.hash.slice(1) +']');
            if ($target.length) {
                var targetOffset = $target.offset().top;
                jQuery('html,body').animate({ scrollTop: targetOffset }, 1200, 'quart');
                return false;
            }
        }
    });

});
