add TOC
add TOC

--- a/.gitmodules
+++ b/.gitmodules
@@ -1,4 +1,7 @@
 [submodule "php-markdown"]
 	path = php-markdown
 	url = git://github.com/michelf/php-markdown.git
+[submodule "js/toc"]
+	path = js/toc
+	url = https://github.com/jgallen23/toc
 

--- a/css/main.css
+++ b/css/main.css
@@ -92,20 +92,77 @@
 /* ==========================================================================
    Author's custom styles
    ========================================================================== */
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+/* stoc http://www.1stwebdesigner.com/css/jquery-plugin-smooth-scrolling/ */
+#items {
+    float: right;
+    width: 260px;
+    padding-bottom: 10px;
+    margin:0 0 10px 20px;
+    /* rgba with ie compatibility */
+    background-color: transparent;
+    background-color: rgba(255,255,255,0.4);
+    filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#20ffffff,endColorstr=#20ffffff);
+    -ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#20ffffff,endColorstr=#20ffffff)";
+}
+#items ul {
+    margin: 0 0 0 20px;
+    padding: 0 0 5px;
+    list-style-type: none;
+}
+#items ul ul {
+    font-size: 90%;
+}
+#items ul a {
+    font-family: "arial";
+    text-decoration: none;
+    color: #c10000;
+}
+#items ul a:hover { color: #ff0000 }
+ /* toc https://github.com/jgallen23/toc */
+#wrapper {
+    margin: 0 20px 0 170px;
+}
+
+#toc {
+    top: 0px;
+    left: 0px;
+    height: 100%;
+    position: fixed;
+    background: #333;
+    box-shadow: inset -5px 0 5px 0px #000;
+    width: 150px;
+    padding-top: 20px;
+    color: #fff;
+}
+
+#toc ul {
+    margin: 0;
+    padding: 0;
+    list-style: none;
+}
+
+#toc li {
+    padding: 5px 10px;
+}
+
+#toc a {
+    color: #fff;
+    text-decoration: none;
+    display: block;
+}
+
+#toc .toc-h2 {
+    padding-left: 10px;
+}
+
+#toc .toc-h3 {
+    padding-left: 20px;
+}
+
+#toc .toc-active {
+    background: #336699;
+    box-shadow: inset -5px 0px 10px -5px #000;
+}
 
 
 

file:a/index.html (deleted)
--- a/index.html
+++ /dev/null
@@ -1,41 +1,1 @@
-<!DOCTYPE html>
-<!--[if lt IE 7]>      <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
-<!--[if IE 7]>         <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
-<!--[if IE 8]>         <html class="no-js lt-ie9"> <![endif]-->
-<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
-    <head>
-        <meta charset="utf-8">
-        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
-        <title></title>
-        <meta name="description" content="">
-        <meta name="viewport" content="width=device-width">
 
-        <!-- Place favicon.ico and apple-touch-icon.png in the root directory -->
-
-        <link rel="stylesheet" href="css/normalize.css">
-        <link rel="stylesheet" href="css/main.css">
-        <script src="js/vendor/modernizr-2.6.1.min.js"></script>
-    </head>
-    <body>
-        <!--[if lt IE 7]>
-            <p class="chromeframe">You are using an outdated browser. <a href="http://browsehappy.com/">Upgrade your browser today</a> or <a href="http://www.google.com/chromeframe/?redirect=true">install Google Chrome Frame</a> to better experience this site.</p>
-        <![endif]-->
-
-        <!-- Add your site or application content here -->
-        <p>Hello world! This is HTML5 Boilerplate.</p>
-
-        <script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js"></script>
-        <script>window.jQuery || document.write('<script src="js/vendor/jquery-1.8.0.min.js"><\/script>')</script>
-        <script src="js/plugins.js"></script>
-        <script src="js/main.js"></script>
-
-        <!-- Google Analytics: change UA-XXXXX-X to be your site's ID. -->
-        <script>
-            var _gaq=[['_setAccount','UA-XXXXX-X'],['_trackPageview']];
-            (function(d,t){var g=d.createElement(t),s=d.getElementsByTagName(t)[0];
-            g.src=('https:'==location.protocol?'//ssl':'//www')+'.google-analytics.com/ga.js';
-            s.parentNode.insertBefore(g,s)}(document,'script'));
-        </script>
-    </body>
-</html>
-

file:a/index.md -> file:b/index.md
--- a/index.md
+++ b/index.md
@@ -1,6 +1,104 @@
-Below is a whole bunch of information to help you prepare mashups!
-
-# [Hosted Developer Tools](#hosted-developer-tools)
+Welcome to the GovHack toolkit. This page provides all the information you need to prepare hackfest entries. 
+These tools can be used to make entries like: mobile apps, web apps, data visualisations/infographics
+
+
+- govhack toolkit!!!!
+  - key datasets, directory.gov.au gazetter/AEC electorates/suburbs/postcodes/LGAs
+
+  - definitions, open licence reuse permissive hacker hack data journalism data bis UCX etc.
+ - what do govhack entries look like?
+  - roles; coder, designer UX/graphics
+
+server admin / technical tools
+many projects will require some kind of internet presence, webpage etc.
+video tools, youtube slideshow, FOSS video editing tools
+  - http://ubuntu-tutorials.com/2008/11/11/relaying-postfix-smtp-via-smtpgmailcom/ 
+  - amon
+
+geo
+  - http://converter.mygeodata.eu/vector kml exporter for shp
+  - http://bost.ocks.org/mike/map/ 
+
+R
+  - http://blog.yhathq.com/posts/10-R-packages-I-wish-I-knew-about-earlier.html
+        - excel -> R/rattle/ deducer? http://www.r-bloggers.com/updates-to-the-deducer-family-of-packages/
+
+d3
+  - http://datadrivenjournalism.net/resources/data_driven_documents_defined
+    - http://www.benmcmahen.com/blog/posts/50eb57d55a94d35262000001 d3 svg
+
+API
+  - howto.gov api tutorial
+  - http://shancarter.com/data_converter/
+  - http://training.sunlightfoundation.com/module/data-visualizations-google-docs/
+  - api documentation
+    - WSDL or http://swagger.wordnik.com/ or https://github.com/mashery/iodocs
+    - http://symfony.com/ https://github.com/FriendsOfSymfony/FOSRestBundle http://williamdurand.fr/2012/08/02/rest-apis-with-symfony2-the-right-way/ https://github.com/nelmio/NelmioApiDocBundle better apis https://github.com/liip/LiipHelloBundle
+      - https://github.com/elc/rapi_doc https://github.com/Pajk/apipie-rails
+      - 
+- tools.disclo.gs - how to use data
+  - https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet#wiki-images reference style images?
+  - developer tools inc. linked data
+        - gephi -> neo4j
+          - neo4j lets you build on, do massive queries of who is friends with who
+          - don't use network viz if what you actually have is a tree/hierarchy with no interconnections http://www.randelshofer.ch/treeviz/ http://thejit.org/demos/ http://mbostock.github.com/protovis/ex/treemap.html http://blog.pixelingene.com/2011/07/building-a-tree-diagram-in-d3-js/
+          - http://mbostock.github.com/d3/ex/pack.html http://mbostock.github.com/d3/ex/tree.html
+        - postgis/quantum gis 
+          - (google earth is alright but many limitations) NASA World Wind?
+          - ABS statistical areas
+          - http://irs.gis-lab.info/ wms or http://www.gdal.org/frmt_wms_openstreetmap_tms.xml
+          - can do nearest/isin/union queries - personal geocoder
+          - cloudmade geocoder, google maps my maps
+          - base layers like agri or nearmap
+        - scraperwiki with new pytemplate libraries
+          - makes an API for your data to get in sqlite/json/csv
+        - three.js with cables vis? Overviewer from AP?
+  - govhack library
+    - http://hpneo.github.com/gmaps/examples.html 
+    - android datviz
+      - http://code.google.com/p/afreechart/ http://code.google.com/p/snowdon/ http://code.google.com/p/chartdroid/ http://androidplot.com/ http://code.google.com/p/achartengine/
+    - https://graphics.stanford.edu/wikis/cs448b-12-fall/ data viz theory
+    - https://mixpanel.com/education/understanding-the-first-five-minutes
+    - http://drawingbynumbers.org/toolsandresources
+    - http://wmbriggs.com/blog/?p=6465
+    - http://ofps.oreilly.com/titles/9781449339739/k_00000002.html list of d3 alternatives
+    - http://craigkerstiens.com/2012/10/01/understanding-postgres-performance/
+    - https://github.com/clips/pattern for easy NLP/network analysis/data mining
+    - https://github.com/theodi/open-data-tech-review/wiki othr cleanup/linked data toola
+    - http://www.opentripplanner.org/apidoc/rest.plan.html 
+    - http://selection.datavisualization.ch/ data viz tools catalog
+    - http://www.slideshare.net/OReillyStrata/visualizing-networks-beyond-the-hairball
+    - http://blog.sciencenet.cn/blog-554179-622011.html SNA tools catalog
+    - https://github.com/jacomyal/osdc2012-sigmajs-demo sigmajs filtering/searching
+    - manipulating data - grep/find replace/sed/regex
+    - d3 tools and tutorial http://enjalot.com/ http://news.ycombinator.com/item?id=4608440 
+      - Why d3 is the way it is and how to make charts http://bost.ocks.org/mike/chart/
+      - how to make an xkcd chart http://bl.ocks.org/3914862
+    - http://blog.josephwilk.net/ruby/latent-semantic-analysis-in-ruby.html similar terms usually found together
+    - data viz
+    - http://k2company.com/blog/2012/09/06/toolbox-for-learning-machine-learning-and-data-science/
+    - http://williamparry.blogspot.com.au/2011/04/putting-data-into-google-fusion-tables.html google fusion tutorial
+    - andrewharvey4.wordpress.com postgis/asgs tutorial
+    - http://www.slideshare.net/maxdemarzi/etl-into-neo4j 
+    - http://www.twotorials.com/ for R
+      - http://www.r-bloggers.com/gradient-word-clouds/ http://www.rstudio.com/shiny/ http://blog.ouseful.info/2012/11/28/quick-shiny-demo-exploring-nhs-winter-sit-rep-data/ https://github.com/timelyportfolio/shiny-d3-plot https://github.com/trestletech/shiny-sandbox/tree/master/grn
+      - http://is-r.tumblr.com/post/38240018815/making-prettier-network-graphs-with-sna-and-igraph
+      - http://www.r-bloggers.com/video-simpler-tricks-and-tools-help-debugging-git-latex-and-workflow-with-r-by-prof-rob-hyndman/
+      - http://yihui.name/knitr/ makes reports including google widgets/charts/maps via http://www.r-bloggers.com/googlevis-0-3-2-is-released-better-integration-with-knitr/
+      - http://chartsnthings.tumblr.com/post/36978271916/r-tutorial-simple-charts http://flowingdata.com/2012/12/17/getting-started-with-charts-in-r/
+    - http://dydra.com/ 
+    - http://selection.datavisualization.ch/ data viz tools list
+    - http://nodexl.codeplex.com/ network graphs for excel
+    - http://sunfoundation.tumblr.com/ 
+    - css framework like bootstrap or zurb foundation
+    - analysing - linked data tools
+      - http://govcampau.wikispaces.com/useful+tools 
+      - http://linkeddata.org/home 
+    - analysing - unstructured/nlp incl overviewer, opennlp/nltk, lucene/solr
+      - http://www.r-bloggers.com/simple-text-mining-with-r/ 
+
+
+# Hosted Developer Tools {#hosted-developer-tools}
 
 ### Sourceforge
 
@@ -18,12 +116,12 @@
 
 # The basics of being a data scientist
 

+*   Have a hypothesis � even if you&#8217;re making a tool/api that helps people with their questions too, remember what the objective of that is.
 *   Find the people and tools you need to prove/show/find. This rest of this page will help with the latter.

+*   Analyse and present results � were they what you expected? Do they help explain to others what you have found out? Can present as a interactive data visualisation or a web/mobile application or just a infographic/motion graphics video that tells a story.
 Please note, there are a combination of Analysis and Visualisation tools in each of the major categories below.
 
-# [API Development](#api-development)
+# API Development {#api-development}
 
 
 So an API isn&#8217;t just an XML file ![;)](http://www.govhack.org/wp-includes/images/smilies/icon_wink.gif) 
@@ -46,7 +144,9 @@
 
 
 
-# [Data Visualisation](#data-visualisation)
+# Infographics and Data Visualisation {#data-visualisation}
+
+Infographics try to contextualise charts and graphs to tell a story. Data vis builds on this to find new ways to design insight.
 
 Most of the categories to follow have visualisation tools specific to their purpose.
 
@@ -58,57 +158,8 @@
 
 
 
-# [Augmented Reality Tools](#augmented-reality-tools)
-
-### buildAR
-
-buildAR was the world&#8217;s first AR Content Management System with the first early version launched back in 200\. as a bit of a test to see if people were interested in being able to create their own augmented experiences. MOB Labs officially launched the new improved buildAR at the Augmented Reality event in Silicon Valley in May 2011.
-
-[http://buildAR.com](http://buildar.com/) (normally a 1\. day free trial but GovHack attendees on the day will get a fully activated account for a month. If you are a GovHack attendee want full access now to play, just sign up for a trial and then forward your GovHack Eventbrite registration email to govhack [at] buildar.com and they&#8217;ll set you up for the free month fully activated account within a couple of days.
-
-### Other AR tools and references
-
-theAWEsomeWEB &#8211\. Future of the Augmented Web [http://theAWEsomeWEB.com](http://theawesomeweb.com/)
-
-Layar &#8211\. AR Browser - [http://layar.com](http://layar.com/)
-
-Junaio &#8211\. AR Browser - [http://junaio.com](http://junaio.com/)
-
-Aurasma &#8211\. AR Browser - [http://aurasma.com/](http://aurasma.com/)
-
-Vuforia &#8211\. NFT based AR SDK - [http://qualcomm.com/solutions/<wbr>augmented-reality</wbr>](http://qualcomm.com/solutions/augmented-reality)
-
-String &#8211\. Marker based AR SDK - [http://poweredbystring.com/](http://poweredbystring.com/)
-
-[pointcloud.io](http://pointcloud.io/) - SLAM based AR SDK - [http://pointcloud.io/](http://pointcloud.io/)
-
-ARToolkit &#8211\. Marker based AR SDK - [http://en.wikipedia.org/wiki/<wbr>ARToolKit</wbr>](http://en.wikipedia.org/wiki/ARToolKit)
-
-FLARToolkit &#8211\. Marker based AR SDK - [http://saqoo.sh/a/en/<wbr>flartoolkit/start-up-guide</wbr>](http://saqoo.sh/a/en/flartoolkit/start-up-guide)
-
-Kooaba &#8211\. Visual search platform - [http://kooaba.com](http://kooaba.com/)
-
-Catchoom &#8211\. Visual search platform - [http://catchoom.com/](http://catchoom.com/)
-
-Google Googles &#8211\. Visual search app - [http://www.google.com/mobile/<wbr>goggles/#text</wbr>](http://www.google.com/mobile/goggles/#text)
-
-Vuzix 920AR &#8211\. Wearable display - [http://www.vuzix.com/consumer/<wbr>products_wrap920ar.html</wbr>](http://www.vuzix.com/consumer/products_wrap920ar.html)
-
-Project Glass &#8211\. Googles wearable display project - [http://www.youtube.com/watch?<wbr>v=9c6W4CCU9M4</wbr>](http://www.youtube.com/watch?v=9c6W4CCU9M4)
-
-Mixed Reality &#8211\. Nokia&#8217;s vision for wearable displays [http://www.youtube.com/watch?<wbr>v=CGwvZWyLiBU</wbr>](http://www.youtube.com/watch?v=CGwvZWyLiBU)
-
-City Lens &#8211\. Nokia&#8217;s latest AR app - [http://www.youtube.com/watch?<wbr>v=63lNPkl-EPE&amp;feature=youtu.be</wbr>](http://www.youtube.com/watch?v=63lNPkl-EPE&amp;feature=youtu.be)
-
-AR &#8211\. Wikipedia page - [http://en.wikipedia.org/wiki/<wbr>Augmented_reality</wbr>](http://en.wikipedia.org/wiki/Augmented_reality)
-
-Steve Mann &#8211\. Wearable Computing Pioneer - [http://en.wikipedia.org/wiki/<wbr>Steve_Mann</wbr>](http://en.wikipedia.org/wiki/Steve_Mann)
-
-Thad Starner &#8211\. Wearable Computing Pioneer [http://en.wikipedia.org/wiki/<wbr>Thad_Starner</wbr>](http://en.wikipedia.org/wiki/Thad_Starner)
-
-Mark Weiser &#8211\. Father of Pervasive Computing [http://en.wikipedia.org/wiki/<wbr>Mark_Weiser</wbr>](http://en.wikipedia.org/wiki/Mark_Weiser)
-
-Geographical Data Tools](#geographical-data-tools)
+
+# Geographical Data Tools {#geographical-data-tools}
 
 Check out the[ GeoRabble Boundary Mapper&#8217;s Cookbook](http://georabble.org/2012/05/31/the-boundary-mappers-cookbook/) to see how you can tie all these things together!
 
@@ -124,6 +175,8 @@
 
 ## Visualisation
 
+### Layar and other augmented reality tools
+
 ### Google Fusion Tables/ChartsBin/[OpenHeatMap](http://www.openheatmap.com/)
 
 [![](http://www.govhack.org/wp-content/uploads/fusiontablesscreenshot-300x168.jpg "fusiontablesscreenshot")](http://www.govhack.org/wp-content/uploads/fusiontablesscreenshot.jpg)Input a numerical values and areas to a spreadsheet and maps are produced
@@ -144,7 +197,7 @@
 
 ### 
 
-Tabular Data Tools](#tabular-data-tools)
+# Tabular Data Tools {#tabular-data-tools}
 
 ## Analysis
 
@@ -162,7 +215,7 @@
 
 [Miso Dataset](http://misoproject.com/dataset/)
 

+[![](http://www.govhack.org/wp-content/uploads/How-to-participate-in-GovHack_html_m53b7ee38-293x300.png "miso screenshot")](http://www.govhack.org/wp-content/uploads/How-to-participate-in-GovHack_html_m53b7ee38.png)Javascript data transformation library � especially good if you want to use the output for javascript interactive visualisations because the transformations can be done on-the-fly by users.
 
 ### R Statistical Language
 
@@ -184,13 +237,21 @@
 
 ### Processing.js
 
-Graph (relationships and networks) Data Tools](#graph-relationships-and-networks-data-tools)
+# Unstructured (text documents, webpages, metadata, tweets etc) Data Tools
+
+Scraperwiki
+Overviewer/ Jigsaw
+http://www.cc.gatech.edu/gvu/ii/jigsaw/
+R
+
+
+# Graph (relationships and networks) Data Tools {#graph-relationships-and-networks-data-tools}
 
 ## Analysis
 
 ### Neo4j
 

+[![](http://www.govhack.org/wp-content/uploads/webadmin-data-300x127.png "Neo4\. web admin screenshot")](http://www.govhack.org/wp-content/uploads/webadmin-data.png)Help understand relationships � how is X connected to Y and via what other entities they both are connected to. Imports and exports
 
 can be done using a preexisting tool like Gremlin or by writing a simple Java/Python/Ruby application. Queries can be tested in the built in data browser.
 
@@ -210,7 +271,7 @@
 
 ### [Graphviz](http://www.graphviz.org/)
 

+[![](http://www.govhack.org/wp-content/uploads/How-to-participate-in-GovHack_html_7579906d-300x184.png "Graphviz Screenshot")](http://www.govhack.org/wp-content/uploads/How-to-participate-in-GovHack_html_7579906d.png)Classic directed graph visualisation tool, can even [generate images online without installing](http://ashitani.jp/gv/) or use in webpages with [javascript port of software](http://code.google.com/p/canviz/). File format [�dot� very easy to learn](http://en.wikipedia.org/wiki/DOT_language)
 
 ### Gephi
 
@@ -224,7 +285,11 @@
 
 Below is some additional information including a few previous GovHack projects to get you thinking ![:)](http://www.govhack.org/wp-includes/images/smilies/icon_smile.gif)  More examples are available at [http://mashupaustralia.org/](http://mashupaustralia.org/).
 
-Previous Project Examples](#previous-project-examples)
+# Previous Project Examples {#previous-project-examples}
+
+## The Open Budget
+
+## WeatherTree weather API
 
 ## PlanningAlerts
 
@@ -260,14 +325,14 @@
 
 Issue Tracking: Github
 
-# General Data Hacking and Programming References](#general-data-hacking-and-programming-references)
+# General Data Hacking and Programming References {#general-data-hacking-and-programming-references}
 
 
 [![](http://www.govhack.org/wp-content/uploads/How-to-participate-in-GovHack_html_m6a65720f-300x199.gif "Data Journalism Diagram")](http://www.govhack.org/wp-content/uploads/How-to-participate-in-GovHack_html_m6a65720f.gif)</dt>
 Illustration from Data Journalism Handbook, CC BY-SA 3.0</dd>
 
 

+The best high level reference is the �Understanding Data� and �Delivering Data� chapters of the Data Journalism Handbook which is available online for free at
 
 [datajournalismhandbook.org](http://datajournalismhandbook.org/)
 
@@ -299,7 +364,7 @@
 
 
 
-#[Developer Tools For Your Computer](#developer-tools-for-your-computer)
+# Developer Tools For Your Computer {#developer-tools-for-your-computer}
 
 ### Source Control &#8211\. Git / Subversion
 
@@ -318,3 +383,4 @@
 ## [![](http://www.govhack.org/wp-content/uploads/trac-300x207.png "trac screenshot")](http://www.govhack.org/wp-content/uploads/trac.png)
 
 Issue/task trackers allow you to outline the tasks required for your project and assign them to people to do.
+

file:a/index.php -> file:b/index.php
--- a/index.php
+++ b/index.php
@@ -22,17 +22,31 @@
         <![endif]-->
 
         <!-- Add your site or application content here -->
-   
+        <div id="toc"></div>
+        <div id="wrapper">
+            <div id="items">
+            </div>
 <?php
 include_once "php-markdown/markdown.php";
 echo Markdown(file_get_contents("index.md"));
 ?>
-
+</div>
         <script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js"></script>
         <script>window.jQuery || document.write('<script src="js/vendor/jquery-1.8.0.min.js"><\/script>')</script>
         <script src="js/plugins.js"></script>
         <script src="js/main.js"></script>
-
+        <script src="js/jquery.stoc.js"></script>
+        <script src="js/toc/dist/jquery.toc.min.js"></script>
+        <script>
+            $('#toc').toc({
+                'selectors': 'h1'
+            });
+            $(function(){
+                $("#items").stoc({
+                    search: "#wrapper"
+                });
+            });
+        </script>
         <!-- Google Analytics: change UA-XXXXX-X to be your site's ID. -->
         <script>
             var _gaq=[['_setAccount','UA-XXXXX-X'],['_trackPageview']];

file:b/js/jquery.stoc.js (new)
--- /dev/null
+++ b/js/jquery.stoc.js
@@ -1,1 +1,80 @@
-
+(function($){
+ $.fn.stoc = function(options) {
+	//Our default options
+	var defaults = {
+		search: "body", //where we will search for titles
+		depth: 6, //how many hN should we search
+		start: 1, //which hN will be the first (and after it we go just deeper)
+		stocTitle: "<h2>Contents</h2>", //what to display before our box
+		listType: "ul", //could be ul or ol
+		smoothScroll: 1 
+	};
+	
+	//let's extend our plugin with default or user options when defined
+	var options = $.extend(defaults, options);
+	
+    return this.each(function() {
+		//"cache" our target and search objects
+		obj = $(this); //target
+		src = $(options.search); //search
+		//let's declare some variables. We need this var declaration to create them as local variables (not global)
+		var appHTML = "", tagNumber = 0, txt = "", id = "", before = "", after = "", previous = options.start, start = options.start, depth = options.depth, i = 0, srcTags = "h" + options.start, cacheHN = "";
+		
+		//which tags we will search
+		while ( depth > 1) {
+			start++; //we will just get our start level and numbers higher than it
+			srcTags = srcTags + ", h" + start;
+			depth--; //since went one level up, our depth will go one level down
+		}
+		src.find(srcTags).each(function() {
+			//we will cache our current H element
+			cacheHN = $(this);
+			//if we are on h1, 2, 3...
+			tagNumber = ( cacheHN.get(0).tagName ).substr(1);			
+			
+			//sets the needed id to the element
+			id = cacheHN.attr('id');
+			if (id == "") { //if it doesn't have only, of course
+				id = "h" + tagNumber + "_" + i;
+				cacheHN.attr('id', id);
+			}
+			//our current text
+			txt = cacheHN.text();
+			
+			switch(true) { //with switch(true) we can do comparisons in each case
+				case (tagNumber > previous) : //it means that we went down one level (e.g. from h2 to h3)
+						appHTML = appHTML + "<" + options.listType +"><li>"+ before +"<a href=\"#"+ id + "\">" + txt + "</a>";
+						previous = tagNumber;
+					break;
+				case (tagNumber == previous) : //it means that stay on the same level (e.g. h3 and stay on it)
+						appHTML = appHTML + "</li><li>"+ before +"<a href=\"#"+ id + "\">" + txt +  "</a>";
+					break;
+				case (tagNumber < previous) : //it means that we went up but we don't know how much levels  (e.g. from h3 to h2)
+						while(tagNumber != previous) {
+							appHTML = appHTML + "</" + options.listType +"></li>";
+							previous--;
+						}
+						appHTML = appHTML + "<li>"+ before +"<a href=\"#"+ id + "\">" + txt + "</a></li>";
+					break;
+			}
+			i++;			
+		});
+		//corrects our last item, because it may have some opened ul's
+		while(tagNumber != options.start) {
+			appHTML = appHTML + "</" + options.listType +">";
+			tagNumber--;
+		}
+		//append our html to our object
+		appHTML = options.stocTitle + "<"+ options.listType + ">" + appHTML + "</" + options.listType + ">";
+		obj.append(appHTML);
+		
+		//our pretty smooth scrolling here
+		// acctually I've just compressed the code so you guys will think that I'm the man . Source: http://css-tricks.com/snippets/jquery/smooth-scrolling/
+		if (options.smoothScroll == 1) {
+			$(window).load(function(){
+				function filterPath(string){return string.replace(/^\//,'').replace(/(index|default).[a-zA-Z]{3,4}$/,'').replace(/\/$/,'')}var locationPath=filterPath(location.pathname);var scrollElem=scrollableElement('html','body');obj.find('a[href*=#]').each(function(){var thisPath=filterPath(this.pathname)||locationPath;if(locationPath==thisPath&&(location.hostname==this.hostname||!this.hostname)&&this.hash.replace(/#/,'')){var $target=$(this.hash),target=this.hash;if(target){var targetOffset=$target.offset().top;$(this).click(function(event){event.preventDefault();$(scrollElem).animate({scrollTop:targetOffset},400,function(){location.hash=target})})}}});function scrollableElement(els){for(var i=0,argLength=arguments.length;i<argLength;i++){var el=arguments[i],$scrollElement=$(el);if($scrollElement.scrollTop()>0){return el}else{$scrollElement.scrollTop(1);var isScrollable=$scrollElement.scrollTop()>0;$scrollElement.scrollTop(0);if(isScrollable){return el}}}return[]}
+			});
+		}
+    });
+ };
+})(jQuery);

directory:b/js/toc (new)
--- /dev/null
+++ b/js/toc

directory:a/php-markdown -> directory:b/php-markdown
--- a/php-markdown
+++ b/php-markdown

file:b/tools/tools.iml (new)
--- /dev/null
+++ b/tools/tools.iml
@@ -1,1 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module type="WEB_MODULE" version="4">
+  <component name="NewModuleRootManager" inherit-compiler-output="true">
+    <exclude-output />
+    <content url="file://$MODULE_DIR$/.." />
+    <orderEntry type="sourceFolder" forTests="false" />
+  </component>
+</module>
 
+