$(function() {
    var active_path = location.pathname;
    // function: dispatcher
    var dispatcher = function(path, func) {
        var reg = new RegExp(path);
        if (reg.test(active_path)) func();
    }

    // index
    dispatcher('^/?(index.shtml)?$', function() {
        $('#feed dd:last').css('background', 'none');
        $('#flickr a')
            .hover(
                function() {
                    $(this).animate({
                        opacity: 0.8
                    }, 250);
                },
                function() {
                    $(this).animate({
                        opacity: 1
                    }, 100);
                }
            )
    });

    // irie365
    dispatcher('^/irie365/?(index.shtml)?', function() {
        $('a#flyer').lightBox();
        $('#mainvisual').innerfade({
            speed: 1000,
            timeout: 5000,
            type: 'sequence',
            containerheight: '300px'
        });
    });
});

