(function($){
/*----------------------------------------------------------------
    画像切り替え
----------------------------------------------------------------*/
    $.fn.imgchange = function(options){
        //初期値設定
        var m = $.extend({
            name:  "_over"
        }, options);

        return this.each(function(){
            if (!this) return false;
            //ファイル名取得
            var src   = $(this).attr("src");
            var ftype = src.substring(src.lastIndexOf('.'), src.length);
            var hsrc  = src.replace(ftype, m.name + ftype);
            //オーバー画像読込み
            var img = new Image();
            img.src = hsrc;
            //ロールオーバー処理
            $(this).hover(function (){
                $(this).attr("src",hsrc);
            }, function(){
                $(this).attr("src",src);
            });
        });
        return this;
    }

})(jQuery);

$(document).ready(function() {
	var text = $(".search-box").val();
	if(text != "") {
		$(".search-box").addClass("search-box-focus");
	}
	$(".search-box").focus(function(){
		$(this).addClass("search-box-focus");
	});
	$(".search-box").focusout(function(){
		text = $(this).val();
		if(text == "") {
			$(this).removeClass("search-box-focus");
		}
	});
});
