Move modules to their own directory
Move modules to their own directory

file:a/js/blameasync.js (deleted)
--- a/js/blameasync.js
+++ /dev/null
@@ -1,105 +1,1 @@
-/*
- * GitPHP Javascript blame
- * 
- * Load blame data into blob page asynchronously
- * 
- * @author Christopher Han <xiphux@gmail.com>
- * @copyright Copyright (c) 2011 Christopher Han
- * @package GitPHP
- * @subpackage Javascript
- */
 
-define(["jquery", "tooltip.commit"],
-	function($, tooltipCommit) {
-
-		var blobTable = null;
-		var blameLink = null;
-		var blameCol = null;
-
-		var url = null;
-
-		function buildContainer() {
-			var col = $(document.createElement('td'));
-			col.attr('id', 'blameData');
-			col.css('display', 'none');
-
-			var p = $(document.createElement('p'));
-			p.text(GITPHP_RES_LOADING_BLAME_DATA);
-			p.appendTo(col);
-
-			var div = $(document.createElement('div'));
-			div.css('text-align', 'center');
-
-			var img = $(document.createElement('img'));
-			img.attr('src', url + 'images/blame-loader.gif');
-			img.attr('alt', GITPHP_RES_LOADING);
-			img.appendTo(div);
-
-			div.appendTo(col);
-
-			return col;
-		}
-
-		function insertBlame(data) {
-			blameCol.html(data).addClass('de1');
-
-			var project = window.location.href.match(/p=([^&]+)/);
-			if (!project) {
-				return;
-			}
-			project = unescape(project[1]);
-
-			var url = window.location.href.match(/^([^\?]+\/)/);
-			if (!url) {
-				return;
-			}
-			url = url[1];
-
-			tooltipCommit($('a.commitTip'), project, url);
-		}
-
-		var showBlame = function() {
-			if (blameCol) {
-				blameCol.show('fast');
-				return false;
-			}
-
-			blameCol = buildContainer();
-			blobTable.find('tr:first').prepend(blameCol);
-			blameCol.show('fast');
-			$.get(blameLink.attr('href'), { o: 'js' },
-			function(data) {
-				if (blameCol.css('display') == 'none') {
-					blameCol.html(data).addClass('de1');
-					insertBlame(data);
-				} else {
-					blameCol.fadeOut('fast', function() {
-						insertBlame(data);
-						blameCol.fadeIn('fast');
-					});
-				}
-			});
-		};
-
-		var hideBlame = function() {
-			if (blameCol) {
-				blameCol.hide('fast');
-			}
-			return false;
-		};
-
-		var init = function(blobTableElem, blameLinkElem, pageUrl) {
-			blobTable = blobTableElem;
-			blameLink = blameLinkElem;
-			url = pageUrl;
-
-			blameLink.toggle(showBlame, hideBlame);
-		};
-
-		return {
-			init: init
-		}
-	}
-);
-
-

file:a/js/blob.js -> file:b/js/blob.js
--- a/js/blob.js
+++ b/js/blob.js
@@ -9,7 +9,7 @@
  * @subpackage Javascript
  */
 
-define(["blameasync"], function(blameAsync) {
+define(["modules/blameasync"], function(blameAsync) {
 	$(function() {
 		var url = window.location.href.match(/^([^\?]+\/)/);
 		if (!url) {

--- a/js/common.js
+++ b/js/common.js
@@ -9,7 +9,7 @@
  * @subpackage Javascript
  */
 
-define(["jquery", "lang", "tooltip.snapshot"], function($, lang, tooltipSnapshot) {
+define(["jquery", "modules/lang", "modules/tooltip.snapshot"], function($, lang, tooltipSnapshot) {
 	$(function() {
 		lang($('div.lang_select'));
 		tooltipSnapshot($('a.snapshotTip'));
@@ -27,7 +27,7 @@
 	}
 	url = url[1];
 
-	require(["jquery", "tooltip.commit", "tooltip.tag"], function($, tooltipCommit, tooltipTag) {
+	require(["jquery", "modules/tooltip.commit", "modules/tooltip.tag"], function($, tooltipCommit, tooltipTag) {
 		$(function() {
 			tooltipCommit($('a.commitTip'), project, url);
 			tooltipTag($('a.tagTip'), project, url);

file:a/js/lang.js (deleted)
--- a/js/lang.js
+++ /dev/null
@@ -1,25 +1,1 @@
-/*
- * GitPHP Javascript language selector
- * 
- * Changes the language as soon as it's selected,
- * rather than requiring a submit
- * 
- * @author Christopher Han <xiphux@gmail.com>
- * @copyright Copyright (c) 2011 Christopher Han
- * @package GitPHP
- * @subpackage Javascript
- */
 
-define(["jquery"],
-	function($) {
-		return function(langSelContainer) {
-			langSelContainer.find('select').change(
-				function() {
-					langSelContainer.find('form').submit();
-				}
-			);
-			langSelContainer.find('input[type="submit"]').remove();
-		}
-	}
-);
-

--- /dev/null
+++ b/js/modules/blameasync.js
@@ -1,1 +1,105 @@
+/*
+ * GitPHP Javascript blame
+ * 
+ * Load blame data into blob page asynchronously
+ * 
+ * @author Christopher Han <xiphux@gmail.com>
+ * @copyright Copyright (c) 2011 Christopher Han
+ * @package GitPHP
+ * @subpackage Javascript
+ */
 
+define(["jquery", "modules/tooltip.commit"],
+	function($, tooltipCommit) {
+
+		var blobTable = null;
+		var blameLink = null;
+		var blameCol = null;
+
+		var url = null;
+
+		function buildContainer() {
+			var col = $(document.createElement('td'));
+			col.attr('id', 'blameData');
+			col.css('display', 'none');
+
+			var p = $(document.createElement('p'));
+			p.text(GITPHP_RES_LOADING_BLAME_DATA);
+			p.appendTo(col);
+
+			var div = $(document.createElement('div'));
+			div.css('text-align', 'center');
+
+			var img = $(document.createElement('img'));
+			img.attr('src', url + 'images/blame-loader.gif');
+			img.attr('alt', GITPHP_RES_LOADING);
+			img.appendTo(div);
+
+			div.appendTo(col);
+
+			return col;
+		}
+
+		function insertBlame(data) {
+			blameCol.html(data).addClass('de1');
+
+			var project = window.location.href.match(/p=([^&]+)/);
+			if (!project) {
+				return;
+			}
+			project = unescape(project[1]);
+
+			var url = window.location.href.match(/^([^\?]+\/)/);
+			if (!url) {
+				return;
+			}
+			url = url[1];
+
+			tooltipCommit($('a.commitTip'), project, url);
+		}
+
+		var showBlame = function() {
+			if (blameCol) {
+				blameCol.show('fast');
+				return false;
+			}
+
+			blameCol = buildContainer();
+			blobTable.find('tr:first').prepend(blameCol);
+			blameCol.show('fast');
+			$.get(blameLink.attr('href'), { o: 'js' },
+			function(data) {
+				if (blameCol.css('display') == 'none') {
+					blameCol.html(data).addClass('de1');
+					insertBlame(data);
+				} else {
+					blameCol.fadeOut('fast', function() {
+						insertBlame(data);
+						blameCol.fadeIn('fast');
+					});
+				}
+			});
+		};
+
+		var hideBlame = function() {
+			if (blameCol) {
+				blameCol.hide('fast');
+			}
+			return false;
+		};
+
+		var init = function(blobTableElem, blameLinkElem, pageUrl) {
+			blobTable = blobTableElem;
+			blameLink = blameLinkElem;
+			url = pageUrl;
+
+			blameLink.toggle(showBlame, hideBlame);
+		};
+
+		return {
+			init: init
+		}
+	}
+);
+
+

--- /dev/null
+++ b/js/modules/lang.js
@@ -1,1 +1,25 @@
+/*
+ * GitPHP Javascript language selector
+ * 
+ * Changes the language as soon as it's selected,
+ * rather than requiring a submit
+ * 
+ * @author Christopher Han <xiphux@gmail.com>
+ * @copyright Copyright (c) 2011 Christopher Han
+ * @package GitPHP
+ * @subpackage Javascript
+ */
 
+define(["jquery"],
+	function($) {
+		return function(langSelContainer) {
+			langSelContainer.find('select').change(
+				function() {
+					langSelContainer.find('form').submit();
+				}
+			);
+			langSelContainer.find('input[type="submit"]').remove();
+		}
+	}
+);
+

--- /dev/null
+++ b/js/modules/projectsearch.js
@@ -1,1 +1,183 @@
+/*
+ * GitPHP javascript project search
+ *
+ * Live search of project list
+ *
+ * @author Christopher Han <xiphux@gmail.com>
+ * @copyright Copyright (c) 2010 Christopher Han
+ * @package GitPHP
+ * @subpackage Javascript
+ */
 
+define(["jquery"],
+	function($) {
+
+		var table = null;
+		var searchPanel = null;
+		var msgContainer = null;
+
+		var currentSearch = '';
+		var searchTimer = null;
+
+		var self = null;
+
+		var clearSearch = function() {
+			searchPanel.find('img searchSpinner').show();
+			searchPanel.find('input.projectSearchBox').val('');
+			currentSearch = '';
+			search('');
+			searchPanel.find('img.searchSpinner').hide();
+			return false;
+		};
+
+		var doSearch = function() {
+			var newSearch = searchPanel.find('input.projectSearchBox').val().toLowerCase();
+			if (newSearch != currentSearch) {
+				searchPanel.find('img.searchSpinner').show();
+				if (searchTimer != null) {
+					clearTimeout(searchTimer);
+				}
+				currentSearch = newSearch;
+				searchTimer = setTimeout(function() {
+					self.search(newSearch);
+					searchPanel.find('img.searchSpinner').hide();
+				}, 500);
+			}
+		};
+
+		function bindEvents() {
+			searchPanel.find('form').keypress(function(e) {
+				if (e.which == 13) {
+					return false;
+				}
+			});
+			if (table.find('tr.projectRow').size() > 0) {
+				searchPanel.find('a.clearSearch').click(clearSearch);
+				searchPanel.find('input.projectSearchBox').keyup(doSearch).bind('input paste', doSearch);
+			}
+		}
+
+		function searchRow(row, searchString) {
+			var projectName = row.find('td.projectName a').text();
+			if ((projectName.length > 0) && (projectName.toLowerCase().indexOf(searchString) != -1)) {
+				return true;
+			}
+
+			var projectDesc = row.find('td.projectDescription a').text();
+			if ((projectDesc.length > 0) && (projectDesc.toLowerCase().indexOf(searchString) != -1)) {
+				return true;
+			}
+
+			var projectOwner = row.find('td.projectOwner em').text();
+			if ((projectOwner.length > 0) && (projectOwner.toLowerCase().indexOf(searchString) != -1)) {
+				return true;
+			}
+
+			return false;
+		}
+
+		function noMatchesMessage(show, searchString) {
+			if (show) {
+				if (!msgContainer) {
+					msgContainer = jQuery(document.createElement('div'));
+					msgContainer.addClass('message');
+					msgContainer.appendTo(table);
+				}
+
+				var msg = GITPHP_RES_NO_MATCHES_FOUND.replace(new RegExp('%1'), searchString);
+				msgContainer.text(msg);
+
+				msgContainer.show();
+			} else {
+				if (msgContainer) {
+					msgContainer.hide();
+				}
+			}
+		}
+
+		var search = function(searchString) {
+			clearTimeout(searchTimer);
+			searchTimer = null;
+
+			if (searchString.length == 0) {
+				searchPanel.find('a.clearSearch').hide();
+			} else {
+				searchPanel.find('a.clearSearch').show();
+			}
+
+			var hasMatch = false;
+			var visibleCategories = [];
+
+			// search each project
+			table.find('tr.projectRow').each(function() {
+				var jThis = $(this);
+				if (searchString.length < 1) {
+					jThis.show();
+					hasMatch = true;
+					return;
+				}
+				if (searchRow(jThis, searchString)) {
+					jThis.show();
+					hasMatch = true;
+					var category = jThis.data('category');
+					if (category && (jQuery.inArray(category, visibleCategories) == -1)) {
+						visibleCategories.push(category);
+					}
+				} else {
+					jThis.hide();
+				}
+			});
+
+			// show categories that have matching projects
+			table.find('tr.categoryRow').each(function() {
+				var jThis = $(this);
+				if (searchString.length < 1) {
+					jThis.show();
+					return;
+				}
+				var category = jThis.children('th.categoryName').text();
+				if (category.length > 0) {
+					if (jQuery.inArray(category, visibleCategories) !== -1) {
+						jThis.show();
+					} else {
+						jThis.hide();
+					}
+				}
+			});
+
+			if (hasMatch) {
+				noMatchesMessage(false);
+				table.find('tr.projectHeader').show();
+			} else {
+				noMatchesMessage(true, searchString)
+				table.find('tr.projectHeader').hide();
+			}
+		};
+
+		var init = function(tableElem, searchPanelElem) {
+			table = tableElem;
+			searchPanel = searchPanelElem;
+			self = this;
+
+			// store project categories
+			var category = "";
+			table.find('tr').each(function() {
+				var jThis = $(this);
+				if (jThis.hasClass('categoryRow')) {
+					category = jThis.children('th.categoryName').text();
+				} else if (jThis.hasClass('projectRow')) {
+					if (category.length > 0) {
+						jThis.data('category', category);
+					}
+				}
+			});
+			bindEvents();
+		};
+
+		return {
+			init: init,
+			search: search
+		}
+	}
+);
+

--- /dev/null
+++ b/js/modules/tooltip.commit.js
@@ -1,1 +1,59 @@
+/*
+ * GitPHP Javascript commit tooltip
+ * 
+ * Displays commit messages in a tooltip
+ * 
+ * @author Christopher Han <xiphux@gmail.com>
+ * @copyright Copyright (c) 2011 Christopher Han
+ * @package GitPHP
+ * @subpackage Javascript
+ */
 
+define(["jquery", "ext/jquery.qtip.min"],
+	function($) {
+
+		function getCommitHash(element) {
+			var hash = element.attr('href').match(/h=([0-9a-fA-F]{40}|HEAD)/);
+			return hash ? hash[1] : null;
+		}
+
+		function buildTipConfig(url, project, hash) {
+			return {
+				content: {
+					text: '<img src="' + url + 'images/tooltip-loader.gif" alt="' + GITPHP_RES_LOADING + '" />',
+					ajax: {
+						url: 'index.php',
+						data: {
+							p: project,
+							a: 'commit',
+							o: 'jstip',
+							h: hash
+						},
+						type: 'GET'
+					}
+				},
+				style: {
+					classes: 'ui-tooltip-light ui-tooltip-shadow'
+				},
+				position: {
+					adjust: {
+						screen: true
+					}
+				}
+			}
+		}
+
+		return function(elements, project, href) {
+			elements.each(function(){
+				var jThis = $(this);
+				var hash = getCommitHash(jThis);
+				if (!hash) {
+					return;
+				}
+				var config = buildTipConfig(href, project, hash);
+				jThis.qtip(config);
+			});
+		}
+	}
+);
+

--- /dev/null
+++ b/js/modules/tooltip.snapshot.js
@@ -1,1 +1,64 @@
+/*
+ * GitPHP Javascript snapshot tooltip
+ * 
+ * Displays choices of snapshot format in a tooltip
+ * 
+ * @author Christopher Han <xiphux@gmail.com>
+ * @copyright Copyright (c) 2011 Christopher Han
+ * @package GitPHP
+ * @subpackage Javascript
+ */
 
+define(["jquery", "ext/jquery.qtip.min"],
+	function($) {
+		
+		function buildTipContent(href) {
+			var content = '<div>' + GITPHP_RES_SNAPSHOT + ': ';
+			var first = true;
+			for (var type in GITPHP_SNAPSHOT_FORMATS) {
+				if (!first) {
+					content += ' | ';
+				}
+				content += '<a href="' + href + '&fmt=' + type + '">' + GITPHP_SNAPSHOT_FORMATS[type] + '</a>';
+				first = false;
+			}
+			content += '</div>';
+			return content;
+		}
+
+		function buildTipConfig(content) {
+			return {
+				content: {
+					text: content
+				},
+				show: {
+					event: 'click'
+				},
+				hide: {
+					fixed: true,
+					delay: 150
+				},
+				style: {
+					classes: 'ui-tooltip-light ui-tooltip-shadow'
+				},
+				position: {
+					adjust: {
+						screen: true
+					}
+				}
+			}
+		}
+
+		return function(elements) {
+			elements.each(function(){
+				var jThis = $(this);
+				var href = jThis.attr('href');
+				var content = buildTipContent(href);
+				var config = buildTipConfig(content);
+				jThis.qtip(config);
+				jThis.click(function() { return false; });
+			});
+		}
+	}
+);
+

--- /dev/null
+++ b/js/modules/tooltip.tag.js
@@ -1,1 +1,59 @@
+/*
+ * GitPHP Javascript tag tooltip
+ * 
+ * Displays tag messages in a tooltip
+ * 
+ * @author Christopher Han <xiphux@gmail.com>
+ * @copyright Copyright (c) 2011 Christopher Han
+ * @package GitPHP
+ * @subpackage Javascript
+ */
 
+define(["jquery", "ext/jquery.qtip.min"],
+	function($) {
+
+		function getTagName(element) {
+			var tag = element.attr('href').match(/h=([^&]+)/);
+			return tag ? tag[1] : null;
+		}
+
+		function buildTipConfig(url, project, tag) {
+			return {
+				content: {
+					text: '<img src="' + url + 'images/tooltip-loader.gif" alt="' + GITPHP_RES_LOADING + '" />',
+					ajax: {
+						url: 'index.php',
+						data: {
+							p: project,
+							a: 'tag',
+							o: 'jstip',
+							h: tag
+						},
+						type: 'GET'
+					}
+				},
+				style: {
+					classes: 'ui-tooltip-light ui-tooltip-shadow'
+				},
+				position: {
+					adjust: {
+						screen: true
+					}
+				}
+			}
+		}
+
+		return function(elements, project, href) {
+			elements.each(function(){
+				var jThis = $(this);
+				var tag = getTagName(jThis);
+				if (!tag) {
+					return;
+				}
+				var config = buildTipConfig(href, project, tag);
+				jThis.qtip(config);
+			});
+		}
+	}
+);
+

--- a/js/projectlist.js
+++ b/js/projectlist.js
@@ -9,7 +9,7 @@
  * @subpackage Javascript
  */
 
-define(["projectsearch"], function(projectSearch) {
+define(["modules/projectsearch"], function(projectSearch) {
 	$(function() {
 		projectSearch.init($('table.projectList'), $('div.projectSearch'));
 	});

file:a/js/projectsearch.js (deleted)
--- a/js/projectsearch.js
+++ /dev/null
@@ -1,183 +1,1 @@
-/*
- * GitPHP javascript project search
- *
- * Live search of project list
- *
- * @author Christopher Han <xiphux@gmail.com>
- * @copyright Copyright (c) 2010 Christopher Han
- * @package GitPHP
- * @subpackage Javascript
- */
 
-define(["jquery"],
-	function($) {
-
-		var table = null;
-		var searchPanel = null;
-		var msgContainer = null;
-
-		var currentSearch = '';
-		var searchTimer = null;
-
-		var self = null;
-
-		var clearSearch = function() {
-			searchPanel.find('img searchSpinner').show();
-			searchPanel.find('input.projectSearchBox').val('');
-			currentSearch = '';
-			search('');
-			searchPanel.find('img.searchSpinner').hide();
-			return false;
-		};
-
-		var doSearch = function() {
-			var newSearch = searchPanel.find('input.projectSearchBox').val().toLowerCase();
-			if (newSearch != currentSearch) {
-				searchPanel.find('img.searchSpinner').show();
-				if (searchTimer != null) {
-					clearTimeout(searchTimer);
-				}
-				currentSearch = newSearch;
-				searchTimer = setTimeout(function() {
-					self.search(newSearch);
-					searchPanel.find('img.searchSpinner').hide();
-				}, 500);
-			}
-		};
-
-		function bindEvents() {
-			searchPanel.find('form').keypress(function(e) {
-				if (e.which == 13) {
-					return false;
-				}
-			});
-			if (table.find('tr.projectRow').size() > 0) {
-				searchPanel.find('a.clearSearch').click(clearSearch);
-				searchPanel.find('input.projectSearchBox').keyup(doSearch).bind('input paste', doSearch);
-			}
-		}
-
-		function searchRow(row, searchString) {
-			var projectName = row.find('td.projectName a').text();
-			if ((projectName.length > 0) && (projectName.toLowerCase().indexOf(searchString) != -1)) {
-				return true;
-			}
-
-			var projectDesc = row.find('td.projectDescription a').text();
-			if ((projectDesc.length > 0) && (projectDesc.toLowerCase().indexOf(searchString) != -1)) {
-				return true;
-			}
-
-			var projectOwner = row.find('td.projectOwner em').text();
-			if ((projectOwner.length > 0) && (projectOwner.toLowerCase().indexOf(searchString) != -1)) {
-				return true;
-			}
-
-			return false;
-		}
-
-		function noMatchesMessage(show, searchString) {
-			if (show) {
-				if (!msgContainer) {
-					msgContainer = jQuery(document.createElement('div'));
-					msgContainer.addClass('message');
-					msgContainer.appendTo(table);
-				}
-
-				var msg = GITPHP_RES_NO_MATCHES_FOUND.replace(new RegExp('%1'), searchString);
-				msgContainer.text(msg);
-
-				msgContainer.show();
-			} else {
-				if (msgContainer) {
-					msgContainer.hide();
-				}
-			}
-		}
-
-		var search = function(searchString) {
-			clearTimeout(searchTimer);
-			searchTimer = null;
-
-			if (searchString.length == 0) {
-				searchPanel.find('a.clearSearch').hide();
-			} else {
-				searchPanel.find('a.clearSearch').show();
-			}
-
-			var hasMatch = false;
-			var visibleCategories = [];
-
-			// search each project
-			table.find('tr.projectRow').each(function() {
-				var jThis = $(this);
-				if (searchString.length < 1) {
-					jThis.show();
-					hasMatch = true;
-					return;
-				}
-				if (searchRow(jThis, searchString)) {
-					jThis.show();
-					hasMatch = true;
-					var category = jThis.data('category');
-					if (category && (jQuery.inArray(category, visibleCategories) == -1)) {
-						visibleCategories.push(category);
-					}
-				} else {
-					jThis.hide();
-				}
-			});
-
-			// show categories that have matching projects
-			table.find('tr.categoryRow').each(function() {
-				var jThis = $(this);
-				if (searchString.length < 1) {
-					jThis.show();
-					return;
-				}
-				var category = jThis.children('th.categoryName').text();
-				if (category.length > 0) {
-					if (jQuery.inArray(category, visibleCategories) !== -1) {
-						jThis.show();
-					} else {
-						jThis.hide();
-					}
-				}
-			});
-
-			if (hasMatch) {
-				noMatchesMessage(false);
-				table.find('tr.projectHeader').show();
-			} else {
-				noMatchesMessage(true, searchString)
-				table.find('tr.projectHeader').hide();
-			}
-		};
-
-		var init = function(tableElem, searchPanelElem) {
-			table = tableElem;
-			searchPanel = searchPanelElem;
-			self = this;
-
-			// store project categories
-			var category = "";
-			table.find('tr').each(function() {
-				var jThis = $(this);
-				if (jThis.hasClass('categoryRow')) {
-					category = jThis.children('th.categoryName').text();
-				} else if (jThis.hasClass('projectRow')) {
-					if (category.length > 0) {
-						jThis.data('category', category);
-					}
-				}
-			});
-			bindEvents();
-		};
-
-		return {
-			init: init,
-			search: search
-		}
-	}
-);
-

file:a/js/tooltip.commit.js (deleted)
--- a/js/tooltip.commit.js
+++ /dev/null
@@ -1,59 +1,1 @@
-/*
- * GitPHP Javascript commit tooltip
- * 
- * Displays commit messages in a tooltip
- * 
- * @author Christopher Han <xiphux@gmail.com>
- * @copyright Copyright (c) 2011 Christopher Han
- * @package GitPHP
- * @subpackage Javascript
- */
 
-define(["jquery", "ext/jquery.qtip.min"],
-	function($) {
-
-		function getCommitHash(element) {
-			var hash = element.attr('href').match(/h=([0-9a-fA-F]{40}|HEAD)/);
-			return hash ? hash[1] : null;
-		}
-
-		function buildTipConfig(url, project, hash) {
-			return {
-				content: {
-					text: '<img src="' + url + 'images/tooltip-loader.gif" alt="' + GITPHP_RES_LOADING + '" />',
-					ajax: {
-						url: 'index.php',
-						data: {
-							p: project,
-							a: 'commit',
-							o: 'jstip',
-							h: hash
-						},
-						type: 'GET'
-					}
-				},
-				style: {
-					classes: 'ui-tooltip-light ui-tooltip-shadow'
-				},
-				position: {
-					adjust: {
-						screen: true
-					}
-				}
-			}
-		}
-
-		return function(elements, project, href) {
-			elements.each(function(){
-				var jThis = $(this);
-				var hash = getCommitHash(jThis);
-				if (!hash) {
-					return;
-				}
-				var config = buildTipConfig(href, project, hash);
-				jThis.qtip(config);
-			});
-		}
-	}
-);
-

file:a/js/tooltip.snapshot.js (deleted)
--- a/js/tooltip.snapshot.js
+++ /dev/null
@@ -1,64 +1,1 @@
-/*
- * GitPHP Javascript snapshot tooltip
- * 
- * Displays choices of snapshot format in a tooltip
- * 
- * @author Christopher Han <xiphux@gmail.com>
- * @copyright Copyright (c) 2011 Christopher Han
- * @package GitPHP
- * @subpackage Javascript
- */
 
-define(["jquery", "ext/jquery.qtip.min"],
-	function($) {
-		
-		function buildTipContent(href) {
-			var content = '<div>' + GITPHP_RES_SNAPSHOT + ': ';
-			var first = true;
-			for (var type in GITPHP_SNAPSHOT_FORMATS) {
-				if (!first) {
-					content += ' | ';
-				}
-				content += '<a href="' + href + '&fmt=' + type + '">' + GITPHP_SNAPSHOT_FORMATS[type] + '</a>';
-				first = false;
-			}
-			content += '</div>';
-			return content;
-		}
-
-		function buildTipConfig(content) {
-			return {
-				content: {
-					text: content
-				},
-				show: {
-					event: 'click'
-				},
-				hide: {
-					fixed: true,
-					delay: 150
-				},
-				style: {
-					classes: 'ui-tooltip-light ui-tooltip-shadow'
-				},
-				position: {
-					adjust: {
-						screen: true
-					}
-				}
-			}
-		}
-
-		return function(elements) {
-			elements.each(function(){
-				var jThis = $(this);
-				var href = jThis.attr('href');
-				var content = buildTipContent(href);
-				var config = buildTipConfig(content);
-				jThis.qtip(config);
-				jThis.click(function() { return false; });
-			});
-		}
-	}
-);
-

file:a/js/tooltip.tag.js (deleted)
--- a/js/tooltip.tag.js
+++ /dev/null
@@ -1,59 +1,1 @@
-/*
- * GitPHP Javascript tag tooltip
- * 
- * Displays tag messages in a tooltip
- * 
- * @author Christopher Han <xiphux@gmail.com>
- * @copyright Copyright (c) 2011 Christopher Han
- * @package GitPHP
- * @subpackage Javascript
- */
 
-define(["jquery", "ext/jquery.qtip.min"],
-	function($) {
-
-		function getTagName(element) {
-			var tag = element.attr('href').match(/h=([^&]+)/);
-			return tag ? tag[1] : null;
-		}
-
-		function buildTipConfig(url, project, tag) {
-			return {
-				content: {
-					text: '<img src="' + url + 'images/tooltip-loader.gif" alt="' + GITPHP_RES_LOADING + '" />',
-					ajax: {
-						url: 'index.php',
-						data: {
-							p: project,
-							a: 'tag',
-							o: 'jstip',
-							h: tag
-						},
-						type: 'GET'
-					}
-				},
-				style: {
-					classes: 'ui-tooltip-light ui-tooltip-shadow'
-				},
-				position: {
-					adjust: {
-						screen: true
-					}
-				}
-			}
-		}
-
-		return function(elements, project, href) {
-			elements.each(function(){
-				var jThis = $(this);
-				var tag = getTagName(jThis);
-				if (!tag) {
-					return;
-				}
-				var config = buildTipConfig(href, project, tag);
-				jThis.qtip(config);
-			});
-		}
-	}
-);
-

comments