$(document).ready(function () {
    createSharingActions();
});

function createSharingActions() {
    $('.shareimg').mouseover(function(event) {
        var size = '';
        size = $(this).attr("data-size");
        $(this).attr('src', '/css/stylesheets/images/share_down'+size+'.png');
        $(this).siblings('.share-panel').css('visibility', 'visible');        
    });
    
    $('.shareimg').mouseout(function(event) {
        var size = '';
        size = $(this).attr("data-size");
        $(this).attr('src', '/css/stylesheets/images/share_up'+size+'.png');
        $(this).siblings('.share-panel').css('visibility', 'hidden');
    });
    
    $('.share-panel').mouseover(function(event) {
        var size = '';
        size = $(this).siblings('img').attr("data-size");
        $(this).css('visibility', 'visible');
        $(this).siblings('img').attr('src', '/css/stylesheets/images/share_down'+size+'.png');
    });
    
    $('.share-panel').mouseout(function(event) {        
        var size = '';
        size = $(this).siblings('img').attr("data-size");
        $(this).css('visibility', 'hidden');
        $(this).siblings('img').attr('src', '/css/stylesheets/images/share_up'+size+'.png');
    });
    
    $('.more-info-button').mouseover(function(event) {
        $(this).css('background-image', 'url(/css/stylesheets/images/more_info_hover.png)');
    });
    
    $('.more-info-button').mouseout(function(event) {
        $(this).css('background-image', 'url(/css/stylesheets/images/more_info.png)');
        
    });
    
    $('.more-info-container').mouseout(function(event) {
        $(this).children('.more-info-button').css('background-image', 'url(/css/stylesheets/images/more_info.png)');
    });
}


