$(function(){
    $(".colorbox").colorbox({maxHeight:515,maxHeight:675});
    $(".colorbox-video").colorbox({iframe:true, innerWidth:675, innerHeight:515});
    // check current page
    var current_page = $('#domain').val();

    switch (current_page) {
        case 'product-detail':
            current_page = 'product';
            break;
        case 'promotion-detail':
            current_page = 'promotion';
            break;
    }

    $("#navigation > li img").each(function(){
        var current_path = $(this).attr('src');
        if(current_path.indexOf(current_page) != -1)
            $(this).attr('src',current_path.replace('/out/','/over/'));
    })
    // end check

    // mouseover effect
    $("#navigation li").hover(function(){
        var current_path = $('img', this).attr('src');
        if(current_path.indexOf(current_page) == -1){
            $('img', this).attr('src',current_path.replace('/out/','/over/'));
        }
    }, function() {
        var current_path = $('img', this).attr('src');
        if(current_path.indexOf(current_page) == -1){
            $('img', this).attr('src',current_path.replace('/over/','/out/'));
        }
    });


// end mouseover effect
});



