/* ================================================================

JavaScript Information

 Site URI:      http://www.shanon.co.jp/
 File URI:      http://www.shanon.co.jp/shared/js/jquery.config.js
 File name:     jquery.config.js
 Summary:       User jQuery
 Created:       2009-01-31
 Last update:   2009-01-31 by xxx
 Licensed:      MIT License
 Author:        Probo Inc.(http://probo.jp/)

Order of description

 + rollover
 + external link
 + page scroll

================================================================ */

$(function(){

    // rollover(tag:img, input)
    var img_cache = new Object();
    $("#globalNav li img").not('[src*="_o"]').each(function(){
        var imgsrc = this.src;
        var imgsrc_non_filetype = this.src.lastIndexOf('.');
        var imgsrc_over = this.src.substr(0,imgsrc_non_filetype)+'_o'+this.src.substr(imgsrc_non_filetype,4);
        img_cache[this.src] = new Image();
        img_cache[this.src].src = imgsrc_over;
        $(this).hover(
            function (){
                this.src = imgsrc_over;
            },
            function (){
                this.src = imgsrc;
            }
        );    
    });

    // external link
   // $('a[href^="http"]').not('a[href^="http://202.214.175.196/"]').click(function(){
//       window.open(this.href, '');
//       return false;
//    });
//    $('a[href^="http"]').not('a[href^="http://202.214.175.196/"]').addClass("ExLink");

    // page scroll
    jQuery.easing.quart = function(x, t, b, c, d){
        return -c * ((t=t/d-1)*t*t*t - 1) + b;
    };
    $('.return a,.return-foot a').click(function(){
        $('html,body').animate({scrollTop:0}, 500, 'quart');
        return false;
    });
    
    // stripe table
    $('.tbl-stripe tr:nth-child(odd)').addClass('odd');
    $('.tbl-stripe tr:nth-child(even)').addClass('even');
    
});



