﻿function ViewRootFolders() {
    $.ajaxDotNet("/App_AjaxServices/Extranet/FilesAndFolders.asmx/ViewRootFolders", {
        verb: "GET",
        success: function(html) {
            var el = document.getElementById('folders-and-files');
            el.innerHTML = html;
        },
        error: function(obj) {
            debugger;
        }
    });
}

function ViewFolder(foldervirtualpath) {
    $.ajaxDotNet('/App_AjaxServices/Extranet/FilesAndFolders.asmx/ViewChildFolders', {
        verb: 'POST',
        data: { 'foldervirtualpath': foldervirtualpath },
        success: function(html) {
            document.getElementById('folders-and-files').innerHTML = html;
        },
        error: function(obj) {
            debugger
            // Do Something
        }
    });
}

$(document).ready(function() {
    $("#nav-one li").hover(
        function() { $("ul", this).fadeIn("fast"); },
        function() { }
    );
    if (document.all) {
        $("#nav-one li").hoverClass("sfHover");
    }
});

$.fn.hoverClass = function(c) {
    return this.each(function() {
        $(this).hover(
            function() { $(this).addClass(c); },
            function() { $(this).removeClass(c); }
        );
    });
};    
