$(function(){
    configureLogin();
    dropShadows();
    highlightIcons();
    removeUnwantedElements();
    /*prepareTopMenu();*/
    $("#vox-login-link").click(function (event) {
        if ($("#vox-login").is(":hidden")) {
            $("#quick_login").css("margin-top", "0px");
            $("#vox-login").slideDown();
        } else {
            $("#quick_login").css("margin-top", "8px");
            $("#vox-login").hide();
        }
      event.preventDefault();
    });
    $("#vox-quick-links1").click(function (event) {
        if ($("#vox-login").is(":hidden")) {
            $("#vox-login").slideDown();
        } else {
            $("#vox-login").hide();
        }
      event.preventDefault();
    });
});

function removeUnwantedElements(){
    $("a[title='Listen to chapter']").remove();
    $("#vox-verset br:first").remove();
}

function dropShadows(){
          var border = RUZEE.ShadedBorder.create({shadow:16});
          border.render($('#vox-header-img .moduletable'));
}
function configureLogin(){
    $("#vox-login br").remove();
    $("#form-login-remember").prepend("<br/>");
}

function prepareTopMenu(){
    $("#vox-top-menu li a").wrap('<span id="vinner">').wrap('<span id="vouter">');
    $("#active_menu-nav").parent().addClass("active").parent().addClass("active");
}

function highlightIcons() {
    $("a[title='E-mail']").hover(
        function(){$('img', this).attr('src', '/voxdomini/templates/vox/images/emailButton_hover.png')},
        function(){$('img', this).attr('src', '/voxdomini/templates/vox/images/emailButton.png')}
    );
    $("a[title='Print']").hover(
        function(){$('img', this).attr('src', '/voxdomini/templates/vox/images/printButton_hover.png')},
        function(){$('img', this).attr('src', '/voxdomini/templates/vox/images/printButton.png')}
    );
    $("a[title='PDF']").hover(
        function(){$('img', this).attr('src', '/voxdomini/templates/vox/images/pdf_button_hover.png')},
        function(){$('img', this).attr('src', '/voxdomini/templates/vox/images/pdf_button.png')}
    );
    $("span[title^='Edit Article']").hover(
        function(){$('img', this).attr('src', '/voxdomini/templates/vox/images/edit_hover.png')},
        function(){$('img', this).attr('src', '/voxdomini/templates/vox/images/edit.png')}
    );
}

