﻿$(document).ready(function() {
    $(".parent").wrap('<a href="#" />');
    $("#tree").treeview({
        collapsed: true,
        animated: "medium",
        control: "#sidetreecontrol",
        persist: "cookie",
        cookieId: "navigationtree",
        unique: true
    }).css('position', 'static');
})

/*
http://docs.jquery.com/Plugins/Treeview/treeview

Creates a treeview with all branches initally collapsed.
$(".selector").treeview({
   collapsed: true
})

Creates a treeview with fast animations.

$(".selector").treeview({
   animated: "fast"
})


Set to allow only one branch on one level to be open (closing siblings which opening).
$(".selector").treeview({
unique: true
})

Enables the navigation option for this treeview, matching the active treeview element to location.href
$(".selector").treeview({
persist: "location"
})

Saves and restores the state of the selected treeview in a cookie with the name "treeview"
$(".selector").treeview({
persist: "cookie"
})

Sets "navigationtree" as the name of the cookie when persisting the tree.
$(".selector").treeview({
persist: "cookie",
cookieId: "navigationtree"
})

Prerender a tree and add only event handlers.
$("#tree").treeview({
prerendered: true
})
*/
