$(function(){
	var mainHeight = $("#device ul li").height();
	$("#device ul li h4").height(mainHeight);

//Margin
	$("#wrapper").wrapInner("<div id='wrapperInner'></div>");
	$("#wrapperInner").css("margin","0px 25px 0px 25px");
});

//隠し
$(function(){
$("#recipe_more,#mailmagazine_area,#comment_form").hide();
$("#btn_recipe,#btn_mag,#comment_btn").click(function(){
var index = $("#btn_recipe,#btn_mag,#comment_btn").index(this);
$("#recipe_more,#mailmagazine_area,#comment_form").eq(index).slideToggle("slow");
}).css("cursor","pointer");
});


$(function(){
	$('a img').hover(function(){
		$(this).attr('src', $(this).attr('src').replace('_off', '_on'));
			}, function(){
				if (!$(this).hasClass('currentPage')) {
				$(this).attr('src', $(this).attr('src').replace('_on', '_off'));
			}
	});
});

$(function () {
	$('img').error(function(){
		$(this).attr({src:'http://www.shanaihokenkyusho.com/wp/wp-content/themes/shanaiho/images/others/no.gif',alt:'画像が見つかりません'});
	});
});

$(document).ready( function () {
    $('#menu-item-19 a,.blank a').click(function(){
        window.open(this.href, '_blank');
        return false;
    });
});

$(function() {
	$("#breadcrumbs li").each(function() {
		$("#breadcrumbs li span:last-child").remove();
	});
});
