String.prototype.startsWith = function(str) { return (this.match("^" + str) == str) }; function kawareAtashiNoKokoro(me){$("#index-hover-a" + me).find("a:first").removeClass();$("#index-hover-a" + me).find("a:first").addClass("index-head-hover");$("#index-hover-b" + me).find("a:first").removeClass();$("#index-hover-b" + me).find("a:first").addClass("iib-b" + me);}function modoreAtashiNoKokoro(me){$("#index-hover-a" + me).find("a:first").removeClass();$("#index-hover-a" + me).find("a:first").addClass("index-head");$("#index-hover-b" + me).find("a:first").removeClass();$("#index-hover-b" + me).find("a:first").addClass("iib-a" + me);}$(document).ready(function(){$(function(){$("*").each(function(){if(this.id.startsWith('index-hover-')){$(this).hover(function(){kawareAtashiNoKokoro(this.id.substring(13, this.id.length)); },function() { modoreAtashiNoKokoro(this.id.substring(13, this.id.length)); });}});});});