function deleteImage(imageID)
{
    if(confirm('Are you sure you wish to delete this image?')) {
        $.post("/admin/theme/Ajax", { action: "delete-image", image: imageID },

        function(data){
            $('#image-' + imageID).hide('slow');
        });
    }
}

jQuery(document).ready(function() {
    jQuery('#banner_widget').jcarousel({
        vertical: true,
        scroll: 1,
        auto: 5
    });


    $("#banner_widget li img").hover(
        function () {
            inactive = $(this).attr("src");
            large = $(this).attr("rel");
            thumb = $(this).attr("title");
            title   = $(this).attr("alt");
            link  = $(this).attr("class");

            $('.mainimage img').fadeOut(800, function() {
                $('.mainimage img').attr("src",large);
                $('.mainimage a').attr("href",link)
                $('.mainimage img').fadeIn(800);
            });

            $('.subtitles .left').fadeOut('slow',function(){
                $('.subtitles .left').html('<a href="'+ link + '">' + title + '</a>');
                $('.subtitles .left').fadeIn('slow');
            });

            $(this).attr("src",thumb);
            $(this).attr("title",inactive);

        },
        function () {
            inactive = $(this).attr("src");
            thumb = $(this).attr("title");

            $(this).attr("src",thumb);
            $(this).attr("title",inactive);
        }
    );
});



