
//Popup----------------------------------------------------------------------------------

//URL,幅,高さを指定----------------------------------
//HTML記述例↓
//<a href="javascript:OpenWin('*****/index.html','680','500')">～</a>
function OpenWin(URL,myWidth,myHeight) {
  var win = window.open(URL,'newwin','left=0,top=0,location=no,toolbar=no,menubar=no,directories=no,status=no,scrollbars=no,resizable=no,width='+ myWidth+',height='+myHeight);
  win.focus();
}

//全てを個別に指定----------------------------------
//HTML記述例↓
//<a href="javascript:OpenWinSelf('*****/index.html','newsWindow','width=540,height=600,left=0,top=0,location=no,toolbar=no,menubar=no,directories=no,status=no,scrollbars=no,resizable=no');">～</a>
function OpenWinSelf(URL,winName,parameter){
  var selfWin=window.open(URL, winName, parameter);
  selfWin.focus();
}

//閉じる場合は<a href="javascript:window.close();">～</a>を記述


// Smooth scrooll----------------------------------------------------------------------------------
/*$(function() {
    $('a[href*=#]').click(function() {
        if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) {
            var target = $(this.hash);
            target = target.length && target;
            if (target.length) {
                var sclpos = 30;
                var scldurat = 1200;
                var targetOffset = target.offset().top - sclpos;
                $('html,body')
                    .animate({scrollTop: targetOffset}, {duration: scldurat, easing: "easeOutExpo"});
                return false;
            }
        }
    });
});*/



// Rollover----------------------------------------------------------------------------------

jQuery.fn.rollOver = function() {
    return $(this).each( function() {
        this.osrc = $(this).attr('src');
        this.hsrc = this.osrc.replace(/^(.+)(\.[a-zA-Z]+)$/, '$1_o$2');
        this.preload = new Image();
        $(this.preload).attr('src',this.hsrc);
        $(this).mouseover( function() {
            $(this).stop(true,true).attr('src',this.hsrc)
                .fadeTo(0,0.6).fadeTo(800,1.0);
        }).mouseout( function() {
            $(this).stop(true,true).attr('src',this.osrc);
        });
    });
}


$(document).ready( function() { 
$('.imgover').rollOver();
 } );

