Index: branches/prod/youtomb/web/front.py
===================================================================
--- branches/prod/youtomb/web/front.py	(revision 143)
+++ branches/prod/youtomb/web/front.py	(revision 271)
@@ -16,5 +16,5 @@
 
 ADMINISTRATORS = ['youtomb@mit.edu']
-SMTP_SERVER = 'outgoing.mit.edu'
+SMTP_SERVER = 'localhost'
 RRD_DIRECTORY = os.path.join(os.path.expanduser("~"), "run/youtomb/rrd/")
 
@@ -48,4 +48,5 @@
     @cherrypy.expose
     @cherrypy.tools.mako(filename="/parts/latest_scans.mako")
+    @cherrypy.tools.caching(delay=10)
     def latest_scans(self):
         return {'scans': self.parent.get_recent_scans()}
@@ -56,7 +57,12 @@
         self.feeds = Feeds(self)
         self.parts = Parts(self)
+        
+    @cherrypy.expose
+    @cherrypy.tools.mako(filename="/about.mako")
+    def about(self):
+        return {}
 
     def get_recent_scans(self, copyright_only=False):
-        sql = ("SELECT snapshots.*, artifacts.external_id FROM snapshots"
+        sql = ("SELECT snapshots.*, artifacts.external_id, artifacts.time_published FROM snapshots"
             +  " LEFT JOIN artifacts ON snapshots.artifact_id = artifacts.id")
         if copyright_only:
@@ -75,4 +81,36 @@
 
     @cherrypy.expose
+    @cherrypy.tools.mako(filename="/browse.mako")
+    def browse(self, status="down", sort="freshness", direction="down", page=1, count=20):
+        sql = "SELECT * FROM artifacts LEFT JOIN snapshots ON artifacts.last_snapshot = snapshots.id WHERE status LIKE %s"
+        args = (status+"%",)
+        sql_direction = "DESC"
+        if direction == "up":
+            sql_direction = "ASC"
+        if sort == "freshness":
+            sql += " ORDER BY timestamp "+sql_direction
+        elif sort == "views":
+            sql += " ORDER BY num_views "+sql_direction
+        elif sort == "rating":
+            sql += " AND avg_rating IS NOT NULL ORDER BY avg_rating "+sql_direction+", num_views "+sql_direction
+        sql += " LIMIT %s OFFSET %s"
+        args += (int(count), int(count)*(int(page)-1))
+        
+        videos = db().allrows(sql, args)
+        return {'videos': videos,
+                'count': len(videos),
+                'categories': db().allrows("SELECT DISTINCT category FROM snapshots ORDER BY category"),
+                'query': {
+                    'status': status,
+                    'sort': sort,
+                    'direction': direction,
+                    'page': page,
+                    'count': count},
+                'claimants': map(lambda x: {'name': x['status'][15:],
+                                            'count': x['status']},
+                    db().allrows("SELECT status, count(*) AS count FROM snapshots WHERE status LIKE 'down:copyright:%%' GROUP BY status ORDER BY count DESC"))
+                }
+    
+    @cherrypy.expose
     @cherrypy.tools.mako(filename="/results.mako")
     def search(self, preset=None, count=50, **kwargs):
@@ -84,5 +122,5 @@
             args = (int(count),)
         elif preset == "latestdown":
-            sql = "SELECT * FROM artifacts LEFT JOIN snapshots ON artifacts.last_snapshot = snapshots.id WHERE active = 'copyright' ORDER BY timestamp DESC LIMIT %s"
+            sql = "SELECT * FROM artifacts LEFT JOIN snapshots ON artifacts.last_snapshot = snapshots.id WHERE (active = 'copyright' or active = 'inactive') ORDER BY timestamp DESC LIMIT %s"
             args = (int(count),)
         else:
@@ -99,7 +137,13 @@
     def v(self, site, id):
         artifact = db().onerow("SELECT * FROM artifacts WHERE site_id = %s AND external_id = %s", (db().site_id_for_name(site), id))
-        up_snapshot = db().onerow("SELECT * from snapshots where artifact_id = %s and status = 'up' ORDER BY timestamp DESC LIMIT 1", (artifact["id"]))
+        all_snapshot = dict()
         current_snapshot = db().onerow("SELECT * from snapshots where artifact_id = %s ORDER BY timestamp DESC LIMIT 1", (artifact["id"]))
-        all_snapshot = dict(up_snapshot)
+        all_snapshot.update(current_snapshot)
+        up_snapshot = None
+        try:
+            up_snapshot = db().onerow("SELECT * from snapshots where artifact_id = %s and status = 'up' ORDER BY timestamp DESC LIMIT 1", (artifact["id"]))
+            all_snapshot.update(up_snapshot)
+        except:
+            pass
         all_snapshot.update([x for x in current_snapshot.iteritems() if x[1]])
         
@@ -108,16 +152,6 @@
                   'current_snapshot': current_snapshot,
                   'snapshot': all_snapshot,
-                  'thumbnails': []
+                  'thumbnails': db().allrows("SELECT * FROM media WHERE rel = 'thumbnail' AND artifact_id = %s", (artifact["id"],))
                   }
-        try:
-            service = gdata.service.GDataService(server="gdata.youtube.com")
-            r = service.Get("http://gdata.youtube.com/feeds/api/"
-                            +"videos/%s" % (urllib.quote_plus(artifact['external_id']),))
-            group = r.FindExtensions(tag='group',namespace='http://search.yahoo.com/mrss/')[0]
-            params['thumbnails'] = map(lambda x: x.attributes, group.FindChildren(tag='thumbnail',namespace='http://search.yahoo.com/mrss/'))
-            params['feed_available'] = True
-        except:
-            params['feed_available'] = False
-        
         return params
 
@@ -173,7 +207,9 @@
 
     app = cherrypy.tree.mount(Front(), '/' if dev else '/youtomb.fcgi',
-                              {'/static': {'tools.staticdir.on': True,
-                                           'tools.staticdir.dir': static_dir}
-                               })
+        {'/static': {'tools.staticdir.on': True,
+                   'tools.staticdir.dir': static_dir},
+        '/thumbnail': {'tools.staticdir.on': True,
+                       'tools.staticdir.dir': '/mit/freeculture/youtomb/archive/thumbnail'}
+        })
     conf_file = os.path.join(base_dir, 'dev.conf' if dev else 'main.conf')
     cherrypy.config.update(conf_file)
Index: branches/prod/youtomb/web/view.py
===================================================================
--- branches/prod/youtomb/web/view.py	(revision 100)
+++ branches/prod/youtomb/web/view.py	(revision 271)
@@ -68,4 +68,3 @@
 
 class View(object):
-    _cp_config = {'tools.mako.directories': [os.path.join(os.path.dirname(__file__),'templates')],
-                  'tools.mako.module_directory': '/tmp/youtomb_templates'}
+    _cp_config = {'tools.mako.directories': [os.path.join(os.path.dirname(__file__),'templates')]}
Index: branches/prod/youtomb/web/dev.conf
===================================================================
--- branches/prod/youtomb/web/dev.conf	(revision 165)
+++ branches/prod/youtomb/web/dev.conf	(revision 271)
@@ -6,7 +6,7 @@
 log.access_file = "/mit/freeculture/run/youtomb/log/access_log.dev"
 log.error_file = "/mit/freeculture/run/youtomb/log/error_log.dev"
-tools.proxy.on = True
-tools.proxy.base = "http://youtomb.mit.edu:2668/"
 tools.mako.module_directory = "/tmp/youtomb_dev_templates"
+tools.caching.delay = 10
+tools.caching.on = True
 
 # /static requires __file__ for its config, done in code
Index: branches/prod/youtomb/web/media-src/Film_Reel-LICENSE.html
===================================================================
--- branches/prod/youtomb/web/media-src/Film_Reel-LICENSE.html	(revision 227)
+++ branches/prod/youtomb/web/media-src/Film_Reel-LICENSE.html	(revision 227)
@@ -0,0 +1,250 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr">
+	<head>
+		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+				<meta name="keywords" content="Image:Film Reel.svg,Image:Film Reel.svg,Crystal Clear app aktion.png,LGPL,LGPL/ar,LGPL/de,LGPL/es,LGPL/fr,LGPL/it,LGPL/nl,LGPL/pt,LGPL/ru" />
+		<link rel="shortcut icon" href="http://commons.wikimedia.org/favicon.ico" />
+		<link rel="apple-touch-icon" href="http://commons.wikipedia.org/apple-touch-icon.png" />
+		<link rel="search" type="application/opensearchdescription+xml" href="http://commons.wikimedia.org/w/opensearch_desc.php" title="Wikimedia Commons (English)" />
+		<link rel="copyright" href="http://www.gnu.org/copyleft/fdl.html" />
+<link rel="alternate" type="application/rss+xml" title="Wikimedia Commons RSS Feed" href="http://commons.wikimedia.org/w/index.php?title=Special:Recentchanges&amp;feed=rss" />
+<link rel="alternate" type="application/atom+xml" title="Wikimedia Commons Atom Feed" href="http://commons.wikimedia.org/w/index.php?title=Special:Recentchanges&amp;feed=atom" />
+		<title>Image:Film Reel.svg - Wikimedia Commons</title>
+		<style type="text/css" media="screen, projection">/*<![CDATA[*/
+			@import "/skins-1.5/common/shared.css?118";
+			@import "/skins-1.5/monobook/main.css?118";
+		/*]]>*/</style>
+		<link rel="stylesheet" type="text/css" media="print" href="http://commons.wikimedia.org/skins-1.5/common/commonPrint.css?118" />
+		<!--[if lt IE 5.5000]><style type="text/css">@import "/skins-1.5/monobook/IE50Fixes.css?118";</style><![endif]-->
+		<!--[if IE 5.5000]><style type="text/css">@import "/skins-1.5/monobook/IE55Fixes.css?118";</style><![endif]-->
+		<!--[if IE 6]><style type="text/css">@import "/skins-1.5/monobook/IE60Fixes.css?118";</style><![endif]-->
+		<!--[if IE 7]><style type="text/css">@import "/skins-1.5/monobook/IE70Fixes.css?118";</style><![endif]-->
+		<!--[if lt IE 7]><script type="text/javascript" src="/skins-1.5/common/IEFixes.js?118"></script>
+		<meta http-equiv="imagetoolbar" content="no" /><![endif]-->
+		
+		<script type= "text/javascript">/*<![CDATA[*/
+var skin = "monobook";
+var stylepath = "/skins-1.5";
+var wgArticlePath = "/wiki/$1";
+var wgScriptPath = "/w";
+var wgScript = "/w/index.php";
+var wgVariantArticlePath = false;
+var wgActionPaths = [];
+var wgServer = "http://commons.wikimedia.org";
+var wgCanonicalNamespace = "Image";
+var wgCanonicalSpecialPageName = false;
+var wgNamespaceNumber = 6;
+var wgPageName = "Image:Film_Reel.svg";
+var wgTitle = "Film Reel.svg";
+var wgAction = "view";
+var wgRestrictionEdit = [];
+var wgRestrictionMove = [];
+var wgArticleId = "3172955";
+var wgIsArticle = true;
+var wgUserName = null;
+var wgUserGroups = null;
+var wgUserLanguage = "en";
+var wgContentLanguage = "en";
+var wgBreakFrames = false;
+var wgCurRevisionId = "8797225";
+var wgVersion = "1.13alpha";
+var wgEnableAPI = true;
+var wgEnableWriteAPI = false;
+/*]]>*/</script>
+                
+		<script type="text/javascript" src="http://commons.wikimedia.org/skins-1.5/common/wikibits.js?118"><!-- wikibits js --></script>
+		<!-- Head Scripts -->
+		<script type="text/javascript" src="http://commons.wikimedia.org/skins-1.5/common/ajax.js?118"></script>
+		<script type="text/javascript" src="http://commons.wikimedia.org/w/index.php?title=-&amp;action=raw&amp;gen=js&amp;useskin=monobook"><!-- site js --></script>
+		<style type="text/css">/*<![CDATA[*/
+@import "/w/index.php?title=MediaWiki:Common.css&usemsgcache=yes&action=raw&ctype=text/css&smaxage=2678400";
+@import "/w/index.php?title=MediaWiki:Monobook.css&usemsgcache=yes&action=raw&ctype=text/css&smaxage=2678400";
+@import "/w/index.php?title=-&action=raw&gen=css&maxage=2678400";
+/*]]>*/</style>
+	</head>
+<body class="mediawiki ns-6 ltr page-Image_Film_Reel_svg">
+	<div id="globalWrapper">
+		<div id="column-content">
+	<div id="content">
+		<a name="top" id="top"></a>
+		<div id="siteNotice"><script type="text/javascript" language="JavaScript">
+<!--
+document.writeln("\x3cdiv style=\"position:absolute; z-index:100; right:100px; top:-0px;\" class=\"metadata\" id=\"donate\"\x3e \x3cdiv style=\"text-align:right; font-size:80%\"\x3e\x3ci\x3eYour \x3cb\x3e\x3ca href=\"http://wikimediafoundation.org/wiki/Donate\" class=\"extiw\" title=\"foundation:Donate\"\x3econtinued donations\x3c/a\x3e\x3c/b\x3e keep Commons running!\x3c/i\x3e \x3c/div\x3e\x3c/div\x3e\n");
+-->
+</script></div>		<h1 class="firstHeading">Image:Film Reel.svg</h1>
+		<div id="bodyContent">
+			<h3 id="siteSub">From Wikimedia Commons, the free media repository</h3>
+			<div id="contentSub"></div>
+									<div id="jump-to-nav">Jump to: <a href="Film_Reel-LICENSE.html#column-one">navigation</a>, <a href="Film_Reel-LICENSE.html#searchInput">search</a></div>			<!-- start content -->
+			<ul id="filetoc">
+			<li><a href="Film_Reel-LICENSE.html#file">Image</a></li>
+			<li><a href="Film_Reel-LICENSE.html#filehistory">File history</a></li>
+			<li><a href="Film_Reel-LICENSE.html#filelinks">Links</a></li>
+		</ul><div class="fullImageLink" id="file"><a href="http://upload.wikimedia.org/wikipedia/commons/d/dc/Film_Reel.svg"><img alt="Image:Film Reel.svg" src="http://upload.wikimedia.org/wikipedia/commons/thumb/d/dc/Film_Reel.svg/600px-Film_Reel.svg.png" width="600" height="600" border="0" /></a><br /></div><div class="fullMedia">
+<p><a href="http://upload.wikimedia.org/wikipedia/commons/d/dc/Film_Reel.svg" class="internal" title="Film Reel.svg">Film_Reel.svg</a>â <span class="fileInfo"> (SVG file, nominally 600 Ã 600 pixels, file size: 10 KB)</span>
+</p>
+</div>
+<table summary="A standardized table providing complete information about the file, including description of what it shows and how it was made, copyright status and source." class="toccolours" style="width: 100%" cellpadding="2">
+<tr>
+<th style="background: #ccf; text-align: right; vertical-align: top; padding-right: 0.4em; width: 15%" id="fileinfotpl_desc">Description</th>
+<td>
+<p>SVG recreation of an icon from "Crystal Clear" theme, created originally by Everaldo Coelho and YellowIcon</p>
+</td>
+</tr>
+<tr valign="top">
+<th style="background: #ccf; text-align: right; padding-right: 0.4em" id="fileinfotpl_src">Source</th>
+<td>
+<p>self-made</p>
+</td>
+</tr>
+<tr valign="top">
+<th style="background: #ccf; text-align: right; padding-right: 0.4em; white-space: nowrap" id="fileinfotpl_date">Date</th>
+<td>
+<p>Uploaded to Commons on 22 October 2007</p>
+</td>
+</tr>
+<tr valign="top">
+<th style="background: #ccf; text-align: right; padding-right: 0.4em" id="fileinfotpl_aut">Author</th>
+<td>
+<p><a href="http://commons.wikimedia.org/w/index.php?title=User:Fancypants09&amp;action=edit&amp;redlink=1" class="new" title="User:Fancypants09 (page does not exist)">User:Fancypants09</a></p>
+</td>
+</tr>
+<tr valign="top">
+<th style="background: #ccf; text-align: right; padding-right: 0.4em" id="fileinfotpl_perm">Permission<br />
+<small>(<a href="http://commons.wikimedia.org/wiki/Commons:Reusing_content_outside_Wikimedia" title="Commons:Reusing content outside Wikimedia">Reusing this image</a>)</small></th>
+<td>
+<table cellspacing="8" cellpadding="0" style="width:100%; clear:both; margin:0.5em auto; background-color:#f9f9f9; border:2px solid #e0e0e0;" summary="This box reports the standard GNU Lesser General Public License notice, including a web reference to the full license text">
+<tr>
+<td><a href="http://commons.wikimedia.org/wiki/Image:Heckert_GNU_white.svg" class="image" title="GNU head"><img alt="GNU head" src="http://upload.wikimedia.org/wikipedia/commons/thumb/2/22/Heckert_GNU_white.svg/64px-Heckert_GNU_white.svg.png" width="64" height="63" border="0" /></a></td>
+<td><i>This library is free software; you can redistribute it and/or modify it under the terms of the <b><a href="http://en.wikipedia.org/wiki/GNU_Lesser_General_Public_License" class="extiw" title="w:GNU_Lesser_General_Public_License">GNU Lesser General Public License</a></b> as published by the <a href="http://en.wikipedia.org/wiki/Free_Software_Foundation" class="extiw" title="w:Free_Software_Foundation">Free Software Foundation</a>; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See <a href="http://www.gnu.org/licenses/lgpl.html" class="external text" title="http://www.gnu.org/licenses/lgpl.html" rel="nofollow">the GNU Lesser General Public License for more details</a>.</i>
+<hr />
+<p><small><span lang="ar" class="description ar" xml:lang="ar"><a href="http://commons.wikimedia.org/wiki/Template:LGPL/ar" title="Template:LGPL/ar">Ø§ÙØ¹Ø±ØšÙØ©</a> |</span> <span lang="de" class="description de" xml:lang="de"><a href="http://commons.wikimedia.org/wiki/Template:LGPL/de" title="Template:LGPL/de">Deutsch</a> |</span> <span lang="en" class="description en" xml:lang="en"><a href="http://commons.wikimedia.org/wiki/Template:LGPL" title="Template:LGPL">English</a> |</span> <span lang="es" class="description es" xml:lang="es"><a href="http://commons.wikimedia.org/wiki/Template:LGPL/es" title="Template:LGPL/es">EspaÃ±ol</a> |</span> <span lang="fr" class="description fr" xml:lang="fr"><a href="http://commons.wikimedia.org/wiki/Template:LGPL/fr" title="Template:LGPL/fr">FranÃ§ais</a> |</span> <span lang="it" class="description it" xml:lang="it"><a href="http://commons.wikimedia.org/wiki/Template:LGPL/it" title="Template:LGPL/it">Italiano</a> |</span> <span lang="nl" class="description nl" xml:lang="nl"><a href="http://commons.wikimedia.org/wiki/Template:LGPL/nl" title="Template:LGPL/nl">Nederlands</a> |</span> <span lang="pt" class="description pt" xml:lang="pt"><a href="http://commons.wikimedia.org/wiki/Template:LGPL/pt" title="Template:LGPL/pt">PortuguÃªs</a> |</span> <span lang="ru" class="description ru" xml:lang="ru"><a href="http://commons.wikimedia.org/wiki/Template:LGPL/ru" title="Template:LGPL/ru">Ð ÑÑÑÐºÐžÐ¹</a> |</span> <span lang="zh" class="description zh" xml:lang="zh"><a href="http://commons.wikimedia.org/w/index.php?title=Template:LGPL/zh-hans&amp;action=edit&amp;redlink=1" class="new" title="Template:LGPL/zh-hans (page does not exist)">âªäž­æ(ç®äœ)â¬</a> |</span> <span lang="zh" class="description zh" xml:lang="zh"><a href="http://commons.wikimedia.org/w/index.php?title=Template:LGPL/zh-hant&amp;action=edit&amp;redlink=1" class="new" title="Template:LGPL/zh-hant (page does not exist)">âªäž­æ(ç¹é«)â¬</a> |</span> <small class="plainlinks"><a href="http://commons.wikimedia.org/w/index.php?title=Template:LGPL/lang&amp;action=edit" class="external text" title="http://commons.wikimedia.org/w/index.php?title=Template:LGPL/lang&amp;action=edit" rel="nofollow">+/-</a></small></small></p>
+</td>
+</tr>
+</table>
+</td>
+</tr>
+<tr valign="top">
+<td style="background: #ccf; text-align: right; padding-right: 0.4em; font-weight: bold" id="fileinfotpl_ver">Other versions</td>
+<td><a href="http://commons.wikimedia.org/wiki/Image:Crystal_Clear_app_aktion.png" title="Image:Crystal Clear app aktion.png">Image:Crystal Clear app aktion.png</a></td>
+</tr>
+</table>
+
+
+<!-- 
+NewPP limit report
+Preprocessor node count: 192/1000000
+Post-expand include size: 11135/2048000 bytes
+Template argument size: 5352/2048000 bytes
+#ifexist count: 0/500
+-->
+
+<!-- Saved in parser cache with key commonswiki:pcache:idhash:3172955-0!1!0!default!!en!2 and timestamp 20080302200801 -->
+<h2 id="filehistory">File history</h2><p>Click on a date/time to view the file as it appeared at that time.
+</p><table class="filehistory">
+<tr><td></td><th>Date/Time</th><th>User</th><th>Dimensions</th><th class="mw-imagepage-filesize">File size</th><th>Comment</th></tr>
+<tr><td>current</td><td><a href="http://upload.wikimedia.org/wikipedia/commons/d/dc/Film_Reel.svg">05:33, 2 December 2007</a></td><td><a href="http://commons.wikimedia.org/wiki/User:David_Levy" title="User:David Levy">David Levy</a> (<a href="http://commons.wikimedia.org/wiki/User_talk:David_Levy" title="User talk:David Levy">Talk</a> | <a href="http://commons.wikimedia.org/wiki/Special:Contributions/David_Levy" title="Special:Contributions/David Levy">contribs</a>)</td><td>600Ã600</td><td class="mw-imagepage-filesize">10 KB</td><td>improved version uploaded to English Wikipedia by original author</td></tr>
+<tr><td></td><td><a href="http://upload.wikimedia.org/wikipedia/commons/archive/d/dc/20071202053359%21Film_Reel.svg">20:13, 22 October 2007</a></td><td><a href="http://commons.wikimedia.org/w/index.php?title=User:Fancypants09&amp;action=edit&amp;redlink=1" class="new" title="User:Fancypants09 (page does not exist)">Fancypants09</a> (<a href="http://commons.wikimedia.org/wiki/User_talk:Fancypants09" title="User talk:Fancypants09">Talk</a> | <a href="http://commons.wikimedia.org/wiki/Special:Contributions/Fancypants09" title="Special:Contributions/Fancypants09">contribs</a>)</td><td>600Ã600</td><td class="mw-imagepage-filesize">10 KB</td><td>{{Information |Description=Self-made SVG version of a &quot;Crystal Clear&quot; icon |Source=self-made |Date=Oct 22, 2007 |Author= <a href="http://commons.wikimedia.org/w/index.php?title=User:Fancypants09&amp;action=edit&amp;redlink=1" class="new" title="User:Fancypants09 (page does not exist)">Fancypants09</a> }} </td></tr>
+</table>
+<br /><ul><li><a href="http://commons.wikimedia.org/w/index.php?title=Image:Film_Reel.svg&amp;action=edit&amp;externaledit=true&amp;mode=file" title="Image:Film Reel.svg">Edit this file using an external application</a><div><p>(See the <a href="http://meta.wikimedia.org/wiki/Help:External_editors" class="extiw" title="meta:Help:External_editors">setup instructions</a> for more information)
+</p></div></li></ul><h2 id="filelinks">Links</h2>
+<p>The following pages link to this file:</p>
+<ul><li><a href="http://commons.wikimedia.org/wiki/Image:Crystal_Clear_app_aktion.png" title="Image:Crystal Clear app aktion.png">Image:Crystal Clear app aktion.png</a></li>
+<li><a href="http://commons.wikimedia.org/wiki/Image:Future_film.svg" title="Image:Future film.svg">Image:Future film.svg</a></li>
+</ul>
+<div class="printfooter">
+Retrieved from "<a href="Film_Reel-LICENSE.html">http://commons.wikimedia.org/wiki/Image:Film_Reel.svg</a>"</div>
+			<div id="catlinks"><div class='catlinks'><div id="mw-normal-catlinks"><a href="http://commons.wikimedia.org/wiki/Special:Categories" title="Special:Categories">Category</a>: <span dir='ltr'><a href="http://commons.wikimedia.org/wiki/Category:LGPL" title="Category:LGPL">LGPL</a></span></div></div></div>			<!-- end content -->
+			<div class="visualClear"></div>
+		</div>
+	</div>
+		</div>
+		<div id="column-one">
+	<div id="p-cactions" class="portlet">
+		<h5>Views</h5>
+		<div class="pBody">
+			<ul>
+					 <li id="ca-nstab-image" class="selected"><a href="Film_Reel-LICENSE.html" title="View the file page [c]" accesskey="c">File</a></li>
+					 <li id="ca-talk" class="new"><a href="http://commons.wikimedia.org/w/index.php?title=Image_talk:Film_Reel.svg&amp;action=edit" title="Discussion about the content page [t]" accesskey="t">Discussion</a></li>
+					 <li id="ca-edit"><a href="http://commons.wikimedia.org/w/index.php?title=Image:Film_Reel.svg&amp;action=edit" title="You can edit this page. Please use the preview button before saving. [e]" accesskey="e">Edit</a></li>
+					 <li id="ca-history"><a href="http://commons.wikimedia.org/w/index.php?title=Image:Film_Reel.svg&amp;action=history" title="Past versions of this page. [h]" accesskey="h">History</a></li>
+				</ul>
+		</div>
+	</div>
+	<div class="portlet" id="p-personal">
+		<h5>Personal tools</h5>
+		<div class="pBody">
+			<ul>
+				<li id="pt-login"><a href="http://commons.wikimedia.org/w/index.php?title=Special:Userlogin&amp;returnto=Image:Film_Reel.svg" title="You are encouraged to log in, it is not mandatory however. [o]" accesskey="o">Log in / create account</a></li>
+			</ul>
+		</div>
+	</div>
+	<div class="portlet" id="p-logo">
+		<a style="background-image: url(http://upload.wikimedia.org/wikipedia/commons/7/79/Wiki-commons.png);" href="http://commons.wikimedia.org/wiki/Main_Page" title="Visit the Main Page [z]" accesskey="z"></a>
+	</div>
+	<script type="text/javascript"> if (window.isMSIE55) fixalpha(); </script>
+		<div class='portlet' id='p-navigation'>
+		<h5>Navigation</h5>
+		<div class='pBody'>
+			<ul>
+				<li id="n-mainpage"><a href="http://commons.wikimedia.org/wiki/Main_Page" title="Visit the Main Page [z]" accesskey="z">Main Page</a></li>
+				<li id="n-welcome"><a href="http://commons.wikimedia.org/wiki/Commons:Welcome">Welcome</a></li>
+				<li id="n-portal"><a href="http://commons.wikimedia.org/wiki/Commons:Community_Portal" title="About the project, what you can do, where to find things">Community portal</a></li>
+				<li id="n-village-pump"><a href="http://commons.wikimedia.org/wiki/Commons:Village_pump">Village pump</a></li>
+			</ul>
+		</div>
+	</div>
+		<div class='portlet' id='p-participate'>
+		<h5>Participate</h5>
+		<div class='pBody'>
+			<ul>
+				<li id="n-uploadbtn"><a href="http://commons.wikimedia.org/wiki/Commons:Upload">Upload file</a></li>
+				<li id="n-recentchanges"><a href="http://commons.wikimedia.org/wiki/Special:Recentchanges" title="The list of recent changes in the wiki. [r]" accesskey="r">Recent changes</a></li>
+				<li id="n-latestfiles"><a href="http://commons.wikimedia.org/wiki/Special:Newimages">Latest files</a></li>
+				<li id="n-randomimage"><a href="http://commons.wikimedia.org/wiki/Special:Random/Image" title="Load a random file [x]" accesskey="x">Random file</a></li>
+				<li id="n-help"><a href="http://commons.wikimedia.org/wiki/Help:Contents" title="The place to find out.">Help</a></li>
+				<li id="n-contact"><a href="http://commons.wikimedia.org/wiki/Commons:Contact_us">Contact us</a></li>
+				<li id="n-sitesupport"><a href="http://wikimediafoundation.org/wiki/Donate" title="Support us">Donate</a></li>
+			</ul>
+		</div>
+	</div>
+		<div id="p-search" class="portlet">
+		<h5><label for="searchInput">Search</label></h5>
+		<div id="searchBody" class="pBody">
+			<form action="http://commons.wikimedia.org/wiki/Special:Search" id="searchform"><div>
+				<input id="searchInput" name="search" type="text" title="Search Wikimedia Commons [f]" accesskey="f" value="" />
+				<input type='submit' name="go" class="searchButton" id="searchGoButton"	value="Go" title="Go to a page with this exact name if exists" />&nbsp;
+				<input type='submit' name="fulltext" class="searchButton" id="mw-searchButton" value="Search" title="Search the pages for this text" />
+			</div></form>
+		</div>
+	</div>
+	<div class="portlet" id="p-tb">
+		<h5>Toolbox</h5>
+		<div class="pBody">
+			<ul>
+				<li id="t-whatlinkshere"><a href="http://commons.wikimedia.org/wiki/Special:Whatlinkshere/Image:Film_Reel.svg" title="List of all wiki pages that link here [j]" accesskey="j">What links here</a></li>
+				<li id="t-recentchangeslinked"><a href="http://commons.wikimedia.org/wiki/Special:Recentchangeslinked/Image:Film_Reel.svg" title="Recent changes in pages linked from this page [k]" accesskey="k">Related changes</a></li>
+<li id="t-upload"><a href="http://commons.wikimedia.org/wiki/Special:Upload" title="Upload files [u]" accesskey="u">Upload file</a></li>
+<li id="t-specialpages"><a href="http://commons.wikimedia.org/wiki/Special:Specialpages" title="List of all special pages [q]" accesskey="q">Special pages</a></li>
+				<li id="t-print"><a href="http://commons.wikimedia.org/w/index.php?title=Image:Film_Reel.svg&amp;printable=yes" title="Printable version of this page [p]" accesskey="p">Printable version</a></li>				<li id="t-permalink"><a href="http://commons.wikimedia.org/w/index.php?title=Image:Film_Reel.svg&amp;oldid=8797225" title="Permanent link to this version of the page">Permanent link</a></li>			</ul>
+		</div>
+	</div>
+		</div><!-- end of the left (by default at least) column -->
+			<div class="visualClear"></div>
+			<div id="footer">
+				<div id="f-poweredbyico"><a href="http://www.mediawiki.org/"><img src="http://commons.wikimedia.org/skins-1.5/common/images/poweredby_mediawiki_88x31.png" alt="Powered by MediaWiki" /></a></div>
+				<div id="f-copyrightico"><a href="http://wikimediafoundation.org/"><img src="http://commons.wikimedia.org/images/wikimedia-button.png" border="0" alt="Wikimedia Foundation"/></a></div>
+			<ul id="f-list">
+				<li id="lastmod"> This page was last modified on 2 December 2007, at 05:33.</li>
+				<li id="copyright">Text is available under <a href="http://www.gnu.org/copyleft/fdl.html" class="external " title="http://www.gnu.org/copyleft/fdl.html" rel="nofollow">GNU Free Documentation License</a>.<br />
+WikimediaÂ® is a registered trademark of the Wikimedia Foundation, Inc.</li>
+				<li id="privacy"><a href="http://commons.wikimedia.org/wiki/Commons:Privacy_policy" title="Commons:Privacy policy">Privacy policy</a></li>
+				<li id="about"><a href="http://commons.wikimedia.org/wiki/Commons:Welcome" title="Commons:Welcome">About Wikimedia Commons</a></li>
+				<li id="disclaimer"><a href="http://commons.wikimedia.org/wiki/Commons:General_disclaimer" title="Commons:General disclaimer">Disclaimers</a></li>
+			</ul>
+		</div>
+		
+	
+		<script type="text/javascript">if (window.runOnloadHook) runOnloadHook();</script>
+</div>
+<!-- Served by srv165 in 0.204 secs. --></body></html>
Index: branches/prod/youtomb/web/media-src/Film_Reel.svg
===================================================================
--- branches/prod/youtomb/web/media-src/Film_Reel.svg	(revision 184)
+++ branches/prod/youtomb/web/media-src/Film_Reel.svg	(revision 184)
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Generator: Adobe Illustrator 13.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 14948)  -->
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" id="Layer_1" x="0px" y="0px" width="600px" height="600px" viewBox="0 0 600 600" enable-background="new 0 0 600 600" xml:space="preserve">
+<linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="301.9541" y1="140.2417" x2="301.9541" y2="487.8836">
+	<stop offset="0" style="stop-color:#9E9E9E"/>
+	<stop offset="1" style="stop-color:#616161"/>
+</linearGradient>
+<path fill="url(#SVGID_1_)" d="M586.93,324.532c0,110.153-127.573,199.477-284.964,199.477  c-157.402,0-284.987-89.323-284.987-199.477c0-110.164,127.585-199.471,284.987-199.471  C459.356,125.061,586.93,214.369,586.93,324.532z M463.695,228.111c-40.583,0-73.482,20.844-73.482,46.542  c0,25.707,32.899,46.552,73.482,46.552c40.585,0,73.482-20.845,73.482-46.552C537.178,248.955,504.28,228.111,463.695,228.111z   M415.242,366.04c-40.605,0-73.482,21.438-73.482,47.877c0,26.447,32.877,47.896,73.482,47.896  c40.564,0,73.482-21.449,73.482-47.896C488.725,387.479,455.807,366.04,415.242,366.04z M210.594,366.04  c-40.604,0-73.482,21.438-73.482,47.877c0,26.447,32.878,47.896,73.482,47.896c40.574,0,73.472-21.449,73.472-47.896  C284.065,387.479,251.168,366.04,210.594,366.04z M302.137,140.242c-40.594,0-73.482,17.869-73.482,39.896  c0,22.042,32.889,39.905,73.482,39.905c40.575,0,73.494-17.863,73.494-39.905C375.631,158.111,342.712,140.242,302.137,140.242z   M147.313,228.111c-40.594,0-73.482,20.844-73.482,46.542c0,25.707,32.889,46.552,73.482,46.552  c40.574,0,73.482-20.845,73.482-46.552C220.795,248.955,187.887,228.111,147.313,228.111z"/>
+<linearGradient id="SVGID_2_" gradientUnits="userSpaceOnUse" x1="302.25" y1="389.8613" x2="302.25" y2="173.5159">
+	<stop offset="0" style="stop-color:#171717"/>
+	<stop offset="1" style="stop-color:#828282"/>
+</linearGradient>
+<path fill="url(#SVGID_2_)" d="M482.255,279.095c0,63.56-80.581,115.087-180.016,115.087c-99.402,0-179.994-51.527-179.994-115.087  c0-63.57,80.592-115.096,179.994-115.096C401.674,163.999,482.255,215.525,482.255,279.095z"/>
+<path opacity="0.42" fill="#B2B2B2" d="M483.989,253.134c0,63.56-80.581,115.086-180.005,115.086  c-99.414,0-180.005-51.526-180.005-115.086c0-63.57,80.591-115.097,180.005-115.097  C403.408,138.037,483.989,189.563,483.989,253.134z"/>
+<linearGradient id="SVGID_3_" gradientUnits="userSpaceOnUse" x1="303.9844" y1="356.1113" x2="303.9844" y2="139.7655">
+	<stop offset="0" style="stop-color:#171717"/>
+	<stop offset="1" style="stop-color:#828282"/>
+</linearGradient>
+<path fill="url(#SVGID_3_)" d="M483.989,245.345c0,63.559-80.581,115.086-180.005,115.086c-99.414,0-180.005-51.527-180.005-115.086  c0-63.569,80.591-115.097,180.005-115.097C403.408,130.248,483.989,181.776,483.989,245.345z"/>
+<linearGradient id="SVGID_4_" gradientUnits="userSpaceOnUse" x1="301.9531" y1="482.9268" x2="301.9531" y2="159.2057">
+	<stop offset="0" style="stop-color:#171717"/>
+	<stop offset="1" style="stop-color:#828282"/>
+</linearGradient>
+<path fill="url(#SVGID_4_)" d="M547.448,298.794c-5.68,78.127-109.909,140.404-237.709,140.404  c-131.428,0-237.976-65.866-237.976-147.117c0-3.874,0.319-7.708,0.796-11.505c-21.413,20.288-33.685,43.682-33.685,68.61  c0,77.437,117.785,140.201,263.076,140.201c145.292,0,263.081-62.765,263.081-140.201  C565.032,331.418,558.766,314.442,547.448,298.794z"/>
+<path fill="#CCCCCC" d="M577.603,266.546c0,101.543-123.784,183.889-276.489,183.889c-152.705,0-276.486-82.346-276.486-183.889  c0-101.564,123.782-183.895,276.486-183.895C453.818,82.651,577.603,164.981,577.603,266.546z M301.113,90.444  c-140.838,0-255.008,75.937-255.008,169.611c0,93.653,114.17,169.6,255.008,169.6c140.842,0,255.01-75.947,255.01-169.6  C556.123,166.381,441.955,90.444,301.113,90.444z"/>
+<linearGradient id="SVGID_5_" gradientUnits="userSpaceOnUse" x1="301.1094" y1="459.1045" x2="301.1093" y2="85.2428">
+	<stop offset="0" style="stop-color:#FEFEFE"/>
+	<stop offset="1" style="stop-color:#303030"/>
+</linearGradient>
+<path fill="url(#SVGID_5_)" d="M591.455,273.041c0,108.982-129.989,197.311-290.342,197.311  c-160.361,0-290.35-88.329-290.35-197.311c0-108.971,129.988-197.311,290.35-197.311  C461.466,75.729,591.455,164.069,591.455,273.041z M301.113,82.651c-152.705,0-276.486,82.33-276.486,183.895  c0,101.543,123.782,183.889,276.486,183.889c152.705,0,276.489-82.346,276.489-183.889  C577.603,164.981,453.818,82.651,301.113,82.651z"/>
+<linearGradient id="SVGID_6_" gradientUnits="userSpaceOnUse" x1="301.1094" y1="90.4443" x2="301.1094" y2="435.7256">
+	<stop offset="0" style="stop-color:#FFFFFF"/>
+	<stop offset="0.5" style="stop-color:#BFBFBF"/>
+	<stop offset="1" style="stop-color:#E7E7E7"/>
+</linearGradient>
+<path fill="url(#SVGID_6_)" d="M575.868,262.656c0,100.36-123.013,181.734-274.755,181.734  c-151.75,0-274.763-81.374-274.763-181.734c0-100.361,123.012-181.724,274.763-181.724  C452.855,80.932,575.868,162.295,575.868,262.656z M457.055,174.814c-39.136,0-70.846,18.989-70.846,42.4  c0,23.426,31.71,42.416,70.846,42.416c39.124,0,70.846-18.99,70.846-42.416C527.9,193.803,496.179,174.814,457.055,174.814z   M410.324,313.874c-39.135,0-70.847,19.532-70.847,43.617c0,24.095,31.712,43.628,70.847,43.628  c39.125,0,70.846-19.533,70.846-43.628C481.17,333.406,449.449,313.874,410.324,313.874z M213.018,313.874  c-39.135,0-70.845,19.532-70.845,43.617c0,24.095,31.71,43.628,70.845,43.628c39.125,0,70.845-19.533,70.845-43.628  C283.863,333.406,252.143,313.874,213.018,313.874z M301.287,94.765c-39.135,0-70.847,16.276-70.847,36.345  c0,20.08,31.712,36.357,70.847,36.357c39.124,0,70.846-16.277,70.846-36.357C372.133,111.041,340.411,94.765,301.287,94.765z   M152.009,174.814c-39.135,0-70.845,18.989-70.845,42.4c0,23.426,31.71,42.416,70.845,42.416c39.124,0,70.845-18.99,70.845-42.416  C222.854,193.803,191.133,174.814,152.009,174.814z"/>
+<path fill="#F2F2F2" d="M151.949,168.754c-39.155,0-70.907,19.664-70.907,43.917c0,1.039,0.142,2.058,0.253,3.098  c2.464-22.868,33.111-40.955,70.663-40.955c37.523,0,68.139,18.051,70.643,40.884c0.122-1.004,0.264-2.008,0.264-3.027  C222.865,188.418,191.113,168.754,151.949,168.754z"/>
+<path fill="#F2F2F2" d="M456.994,168.754c-39.155,0-70.907,19.664-70.907,43.917c0,1.039,0.143,2.058,0.254,3.098  c2.463-22.868,33.11-40.955,70.662-40.955c37.522,0,68.139,18.051,70.643,40.884c0.123-1.004,0.266-2.008,0.266-3.027  C527.911,188.418,496.159,168.754,456.994,168.754z"/>
+<path fill="#F2F2F2" d="M301.225,89.573c-39.153,0-70.905,16.854-70.905,37.643c0,0.893,0.143,1.765,0.253,2.658  c2.464-19.603,33.111-35.109,70.664-35.109c37.522,0,68.139,15.476,70.643,35.047c0.122-0.861,0.265-1.723,0.265-2.596  C372.144,106.427,340.392,89.573,301.225,89.573z"/>
+<path fill="#F2F2F2" d="M410.262,307.647c-39.152,0-70.904,20.221-70.904,45.168c0,1.075,0.143,2.12,0.253,3.194  c2.465-23.527,33.111-42.136,70.663-42.136c37.523,0,68.139,18.579,70.643,42.055c0.123-1.034,0.265-2.059,0.265-3.113  C481.181,327.868,449.429,307.647,410.262,307.647z"/>
+<path fill="#F2F2F2" d="M212.958,307.647c-39.155,0-70.907,20.221-70.907,45.168c0,1.075,0.143,2.12,0.253,3.194  c2.464-23.527,33.111-42.136,70.663-42.136c37.522,0,68.138,18.579,70.643,42.055c0.123-1.034,0.264-2.059,0.264-3.113  C283.874,327.868,252.123,307.647,212.958,307.647z"/>
+<linearGradient id="SVGID_7_" gradientUnits="userSpaceOnUse" x1="306.1729" y1="205.5352" x2="306.1729" y2="280.294">
+	<stop offset="0" style="stop-color:#EDEDED"/>
+	<stop offset="1" style="stop-color:#D6D6D6"/>
+</linearGradient>
+<path fill="url(#SVGID_7_)" d="M270.686,231.766c6.835-10.607,20.11-17.904,35.6-17.904c14.929,0,27.756,6.811,34.723,16.84  c0.274-0.091,0.539-0.172,0.812-0.264c6.41-3.321,12.819-6.688,18.772-10.674c-11.206-15.358-31.235-25.687-54.307-25.687  c-23.121,0-43.302,10.313-54.534,25.718C258.162,223.653,264.333,227.842,270.686,231.766z"/>
+<linearGradient id="SVGID_8_" gradientUnits="userSpaceOnUse" x1="306.1807" y1="205.5405" x2="306.1807" y2="280.3429">
+	<stop offset="0" style="stop-color:#EDEDED"/>
+	<stop offset="1" style="stop-color:#D6D6D6"/>
+</linearGradient>
+<path fill="url(#SVGID_8_)" d="M330.849,245.375c0,9.918-11.043,17.96-24.674,17.96c-13.619,0-24.662-8.042-24.662-17.96  c0-9.913,11.043-17.955,24.662-17.955C319.806,227.42,330.849,235.463,330.849,245.375z"/>
+<linearGradient id="SVGID_9_" gradientUnits="userSpaceOnUse" x1="306.1748" y1="205.5415" x2="306.1748" y2="280.343">
+	<stop offset="0" style="stop-color:#EDEDED"/>
+	<stop offset="1" style="stop-color:#D6D6D6"/>
+</linearGradient>
+<path fill="url(#SVGID_9_)" d="M270.66,258.97c6.836,10.612,20.13,17.914,35.615,17.914c14.948,0,27.778-6.815,34.755-16.845  c0.272,0.091,0.537,0.172,0.812,0.264c6.409,3.321,12.817,6.688,18.78,10.679c-11.216,15.364-31.254,25.698-54.347,25.698  c-23.121,0-43.323-10.319-54.549-25.729C258.127,267.088,264.312,262.9,270.66,258.97z"/>
+<path fill="#FAFAFA" d="M306.286,197.535c21.874,0,40.91,9.34,52.399,23.385c0.619-0.396,1.289-0.74,1.907-1.156  c-11.206-15.358-31.235-25.687-54.307-25.687c-23.121,0-43.302,10.313-54.534,25.718c0.638,0.385,1.258,0.806,1.886,1.191  C265.154,206.88,284.35,197.535,306.286,197.535z"/>
+<path fill="#FAFAFA" d="M306.175,227.406c-13.615,0-24.653,8.037-24.653,17.944c0,0.593,0.162,1.15,0.245,1.729  c1.206-9.086,11.605-16.215,24.409-16.215c12.808,0,23.213,7.129,24.421,16.215c0.08-0.578,0.242-1.135,0.242-1.729  C330.838,235.443,319.795,227.406,306.175,227.406z"/>
+<path fill="#FAFAFA" d="M341.842,260.303c-0.274-0.091-0.539-0.172-0.812-0.264c-6.977,10.03-19.807,16.845-34.755,16.845  c-15.485,0-28.779-7.302-35.615-17.914c-6.349,3.93-12.533,8.118-18.934,11.981c0.578,0.786,1.268,1.501,1.886,2.261  c5.731-3.529,11.339-7.245,17.048-10.784c6.836,10.612,20.13,17.914,35.615,17.914c14.948,0,27.778-6.815,34.755-16.844  c0.272,0.091,0.537,0.172,0.812,0.263c5.739,2.977,11.438,6.049,16.865,9.518c0.627-0.771,1.327-1.497,1.915-2.297  C354.659,266.992,348.251,263.625,341.842,260.303z"/>
+</svg>
Index: branches/prod/youtomb/web/static/script.js
===================================================================
--- branches/prod/youtomb/web/static/script.js	(revision 271)
+++ branches/prod/youtomb/web/static/script.js	(revision 271)
@@ -0,0 +1,65 @@
+// what: the visual video scanner in the sidebar
+// author: paul irish
+// license: cc-wrapped gpl
+
+var SCANNER = {
+  isInAjax    : false,
+  scansUrl    : '/parts/latest_scans',
+  interval    : 2000,                   // how many milliseconds between visual updates
+  intervalPtr : undefined,
+  howManyPer  : 2,                      // how many to move at a time?
+  animDuration: 500                     // length of slide animation
+};
+
+SCANNER.showScanActivity = function(){
+  if (SCANNER.isInAjax) return;
+  
+  var videosLeft = $('#holdingDiv li');
+  
+  if (videosLeft.length < SCANNER.howManyPer){
+    SCANNER.getMoreScans();
+  }
+  else {
+    if ($('#scanner li').length > 6 ){ videosLeft = videosLeft.slice(0,SCANNER.howManyPer); } // if there are items there already, only move in the first few
+    videosLeft.hide().prependTo('#scanner').slideDown( SCANNER.animDuration ); // get two ones at a time and slide them in.
+    
+    $('#latest_scans').removeAttr('style'); // clear the loading image.
+    
+    // remove videos if therea are more than 25. this is to avoid poor performance and mem leaks.
+    var currScans = $('#scanner li');
+    if (currScans.length >= 25) {currScans.slice(25,currScans.length).remove();}
+  }
+};
+
+SCANNER.getMoreScans = function(){
+  
+  SCANNER.isInAjax = true;
+  
+  $.ajax({
+    url: SCANNER.scansUrl,
+    success: function(html){
+      $("#holdingDiv").append(html);   // throw result into a holdingdiv that's hidden
+      SCANNER.isInAjax = false;
+    }
+  });
+  
+};
+
+SCANNER.init = function(){
+  if ($('#scanner').length){
+  	SCANNER.showScanActivity();
+    SCANNER.intervalPtr = setInterval( SCANNER.showScanActivity , SCANNER.interval ); 
+  }
+  
+} 
+
+
+$(document).ready(function(){
+  $('#searchInput').focus(function(){
+    if ($(this).val() == 'video search') $(this).val('');
+  }).blur(function(){
+    if ($(this).val() == '') $(this).val('video search');
+  });
+  
+  SCANNER.init();
+});
Index: branches/prod/youtomb/web/static/style.css
===================================================================
--- branches/prod/youtomb/web/static/style.css	(revision 271)
+++ branches/prod/youtomb/web/static/style.css	(revision 271)
@@ -0,0 +1,416 @@
+html {
+	width: 100%;
+	height: 100%;
+}
+
+body {
+	background: #514024 url('images/background.gif') repeat-x;
+	margin: 0;
+	padding: 0;
+	height: 100%;
+	font-family:Verdana,Geneva,sans-serif;
+}
+
+img {
+	border: 0;
+	padding: 0;
+}
+
+p {
+	border: 0;
+	padding: 0;
+}
+
+.down {
+	color: #a81111;
+    font-weight: bold;
+    font-size: 125%;
+}
+
+#header {
+	height: 75px;
+	width: 850px;
+	margin: 0 auto;
+}
+
+#logo {
+	position: relative;
+	margin-left: 20px;
+	top: 17px;
+}
+
+#grass {
+	position: absolute;
+	top: 65px;
+	height:10px;
+	z-index: 99;
+	width: 100%;
+	background: transparent url('images/grass.gif') repeat-x bottom;
+}
+
+#nav {
+	height: 40px;
+	width: 850px;
+	background: #233139 url('images/navtop.gif') no-repeat top;
+	margin: 0 auto;
+}
+
+#nav ul {
+	padding: 6px 0 0 15px;
+	margin: 0;
+	color: #c3c7c9;
+}
+
+#nav li {
+	float: left;
+	list-style-type: none;
+	/*margin-right: 15px;*/
+	border-right: 2px solid #c3c7c9;
+}
+#nav li.last { border: 0; }
+
+#nav a {
+	color: #c3c7c9;
+	text-decoration: none;
+	font-weight: bold;
+	font-size: 125%;
+    padding: 0 15px;
+}	
+
+#container {
+	width: 850px;
+	margin: 0 auto;
+	min-height: 770px;
+	border-top: solid 1px #233139;
+}
+
+#maincontent {
+	border-left: solid 4px #233139;
+	border-right: solid 4px #233139;
+	height:100%;
+	padding: 1px 10px 10px;
+	background: #f2f2f2 url('images/lcbackground.jpg') no-repeat left top;
+}
+
+#maincontent h2 {
+	text-align: center;
+	color: #233139;
+	font-size: 135%;
+	margin: 15px 0 10px 0;
+}
+
+#maincontent #about ul {
+	font-size: 110%;
+	margin: 0;
+	padding: 0;
+}
+
+#removed {
+	width: 520px;
+}
+
+.videolist-big {
+	margin: 0;
+	padding: 6px 0 0 0;
+	list-style-type: none;
+	color: #233139;
+}
+
+.videolist-big li {
+	margin: 0;
+	padding: 0 0 20px 0;
+	clear: left;
+}
+
+.videolist-big li .videoinfo {
+    /*display: inline;*/
+    background: #E3E4E5;
+    -moz-border-radius: 14px;
+    -webkit-border-radius: 14px;
+    margin-left: 148px;
+    margin-right: 15px;
+    padding: 2px 8px;
+    /*width: 520px;*/
+}
+
+.videolist-big img {
+	float: left;
+	margin: 0 0 15px 3px;
+	padding: 0;
+}
+
+.videolist-big h3 {
+	margin: 0px 0 2px 0px;
+	padding: 0;
+	/*white-space: nowrap;*/
+	/*overflow: hidden;*/
+	text-align: left;
+	font-weight: bold;
+	font-size: 100%;
+}
+
+.videolist-big p {
+	font-size: 70%;
+	padding: 0;
+	margin: 0px 0 2px 0px;
+	/*overflow: hidden;*/
+	color: #233139;
+}
+
+.videolist-big strong {
+	font-size: 125%;
+}
+
+.videolist-big .medium {
+	font-size: 110%;
+	font-weight: bold;
+}
+
+.videolist-big .datapoints {
+	margin: 3px 0 0 0px;
+	text-align: center;
+	color: #696b6c; 
+}
+
+.videolist-big .datapoint {
+	color: #233139;
+}
+
+.clear {
+	clear: both;
+}
+
+#sidebar {
+	float: right;
+	background-color: #b3b6b8;
+	border-left: 4px solid #233139;
+	border-bottom: 4px solid #233139;
+	border-right: 4px solid #233139;
+	-moz-border-radius-bottomleft: 16px;
+	-webkit-border-bottom-left-radius: 16px;
+	padding-bottom: 8px;
+	width: 300px;
+	height: 100%;
+}
+
+.sidebarbox {
+	width: 285px;
+	margin-left: 7px;
+	margin-top: 10px;
+	height: 47px;
+	background: #e0e1e3 url('./images/sidebar-boxtop.png') no-repeat top;
+}
+
+.flattop {
+    height: 13px;
+	background: #e0e1e3 url('./images/sidebar-flattop.png') no-repeat top;
+}
+
+.sidebarbox .step {
+	float: left;
+	color: #e0e1e3;
+	font-size: 35px;
+	font-weight: bold;
+	margin: 0;
+	padding: 1px 0 0 13px;
+}
+
+.sidebarbox .boxheader {
+	float: left;
+	width: 220px;
+	text-align: left;
+	font-size: 19px;
+	font-weight: bold;
+	color: #233139;
+	margin: 12px 7px 0 20px;
+}
+
+.sidebarboxmiddle {
+	width: 285px;
+	background: #e0e1e3 url('./images/sidebar-boxmiddle.png') repeat-y;
+	margin-left: 7px;
+}
+
+.sidebarboxmiddle p {
+	padding: 4px 0 6px 0; 
+	margin: 0 25px;
+	font-size: 75%;
+	text-align: left;
+	line-height: 1.5em;
+	color: #233139;
+}
+
+h5 {
+	margin: 0;
+	padding: 0px 0 8px 0;
+	font-weight: normal;
+	font-size: 75%;
+	text-align: center;
+}
+
+a {
+	color: #797979;
+}
+
+.sidebarboxmiddle img {
+	padding: 6px 0;
+	margin: 0 auto;
+}
+
+.sidebarboxbottom {
+	width: 285px;
+	margin-left: 7px;
+	height: 13px;
+	background: #e0e1e3 url('./images/sidebar-boxbottom.png') no-repeat bottom;
+}
+
+#scanner {
+	margin: 0 auto;
+	padding: 6px 0 4px;
+	width: 271px;
+	height: 20em;
+	overflow: hidden;
+	list-style-type: none;
+	color: #233139;
+	}
+
+#scanner li {
+    clear: left;
+	margin: 0;
+	padding-top: 2px;
+	height: 37px;
+}
+
+#scanner img {
+	float: left;
+	margin: 0;
+	padding: 3px 0 2px 8px;
+}
+
+#scanner h5 {
+	margin: 5px 0 2px 10px;
+	padding: 0;
+	width: 214px;
+	overflow: hidden;
+	white-space: nowrap;
+	text-overflow: ellipsis;
+	text-align: left;
+	font-weight: bold;
+	font-size: 65%;
+}
+
+#scanner h5 a {
+    color: black;
+}
+
+#scanner p {
+	font-size: 50%;
+	padding: 0;
+	margin: 0 0 0 10px;
+	width: 214px;
+	white-space: nowrap;
+	overflow: hidden;
+	text-overflow: ellipsis;
+	color: #696b6c; 
+}
+
+#scanner .dark {
+	background-color: #b3b6b8;
+}
+
+#footer {
+	color: #c3c7c9;
+	background-color: #233139;
+    padding: 10px 20px;
+}
+#footer p {
+    font-size: 80%;
+}
+#footer #validcheck {
+    font-size: 60%;
+}
+
+#maincontent #about {
+	font-size: 85%;
+	line-height: 1.5em;
+	width: 650px;
+	margin: 0 auto;
+}
+
+#maincontent #about h2 { 	text-align:left; margin-top: 25px;}
+
+#maincontent #about ul {
+	font-size: 128%;
+	list-style-type: none;
+	line-height: 155%;
+	margin: 25px 0;
+	padding: 0;
+}
+
+#maincontent #about h2 a {
+	color: #233139;
+}
+
+div#nav { position: relative; }
+#searchForm { position: absolute; right: 13px; top: 7px; } 
+#searchInput { 
+	width: 98px; 
+	border: 2px solid #c3c7c9; 
+	padding: 1px 4px;
+	color: #c3c7c9;
+	background: #233139;
+}
+
+#searchSubmit {
+	background: #233139 url('./images/submit-button.png') left no-repeat;
+	height: 21px;
+	border: none;
+	color: #c3c7c9;
+}
+
+.sidebarboxmiddle > #filters {
+    margin-left: 1em;
+    margin-bottom: 0;
+	padding-left: 0;
+	list-style-type: none;
+	font-size: 85%;
+	clear: left;
+}
+
+#latest_scans { }
+
+#daisies {
+	position:relative;
+	top: 10px;
+	left: 5px;
+}
+
+#browseheader {
+	font-size: 80%;
+}
+
+.resultnum {
+	margin: 10px 0;
+	float: left;
+}
+
+.sorter {
+	margin: 10px 15px 10px 0;
+	float: right
+}
+
+.sortkey {
+    font-weight: bold;
+}
+
+.sortdir img {
+    border: 0px none;
+}
+
+#pagelinks {
+    text-align: right;
+}
+
+#videodisplay {
+	text-align: center;
+}
Index: branches/prod/youtomb/web/static/jquery-1.2.3.min.js
===================================================================
--- branches/prod/youtomb/web/static/jquery-1.2.3.min.js	(revision 271)
+++ branches/prod/youtomb/web/static/jquery-1.2.3.min.js	(revision 271)
@@ -0,0 +1,32 @@
+/*
+ * jQuery 1.2.3 - New Wave Javascript
+ *
+ * Copyright (c) 2008 John Resig (jquery.com)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ *
+ * $Date: 2008-02-06 00:21:25 -0500 (Wed, 06 Feb 2008) $
+ * $Rev: 4663 $
+ */
+(function(){if(window.jQuery)var _jQuery=window.jQuery;var jQuery=window.jQuery=function(selector,context){return new jQuery.prototype.init(selector,context);};if(window.$)var _$=window.$;window.$=jQuery;var quickExpr=/^[^<]*(<(.|\s)+>)[^>]*$|^#(\w+)$/;var isSimple=/^.[^:#\[\.]*$/;jQuery.fn=jQuery.prototype={init:function(selector,context){selector=selector||document;if(selector.nodeType){this[0]=selector;this.length=1;return this;}else if(typeof selector=="string"){var match=quickExpr.exec(selector);if(match&&(match[1]||!context)){if(match[1])selector=jQuery.clean([match[1]],context);else{var elem=document.getElementById(match[3]);if(elem)if(elem.id!=match[3])return jQuery().find(selector);else{this[0]=elem;this.length=1;return this;}else
+selector=[];}}else
+return new jQuery(context).find(selector);}else if(jQuery.isFunction(selector))return new jQuery(document)[jQuery.fn.ready?"ready":"load"](selector);return this.setArray(selector.constructor==Array&&selector||(selector.jquery||selector.length&&selector!=window&&!selector.nodeType&&selector[0]!=undefined&&selector[0].nodeType)&&jQuery.makeArray(selector)||[selector]);},jquery:"1.2.3",size:function(){return this.length;},length:0,get:function(num){return num==undefined?jQuery.makeArray(this):this[num];},pushStack:function(elems){var ret=jQuery(elems);ret.prevObject=this;return ret;},setArray:function(elems){this.length=0;Array.prototype.push.apply(this,elems);return this;},each:function(callback,args){return jQuery.each(this,callback,args);},index:function(elem){var ret=-1;this.each(function(i){if(this==elem)ret=i;});return ret;},attr:function(name,value,type){var options=name;if(name.constructor==String)if(value==undefined)return this.length&&jQuery[type||"attr"](this[0],name)||undefined;else{options={};options[name]=value;}return this.each(function(i){for(name in options)jQuery.attr(type?this.style:this,name,jQuery.prop(this,options[name],type,i,name));});},css:function(key,value){if((key=='width'||key=='height')&&parseFloat(value)<0)value=undefined;return this.attr(key,value,"curCSS");},text:function(text){if(typeof text!="object"&&text!=null)return this.empty().append((this[0]&&this[0].ownerDocument||document).createTextNode(text));var ret="";jQuery.each(text||this,function(){jQuery.each(this.childNodes,function(){if(this.nodeType!=8)ret+=this.nodeType!=1?this.nodeValue:jQuery.fn.text([this]);});});return ret;},wrapAll:function(html){if(this[0])jQuery(html,this[0].ownerDocument).clone().insertBefore(this[0]).map(function(){var elem=this;while(elem.firstChild)elem=elem.firstChild;return elem;}).append(this);return this;},wrapInner:function(html){return this.each(function(){jQuery(this).contents().wrapAll(html);});},wrap:function(html){return this.each(function(){jQuery(this).wrapAll(html);});},append:function(){return this.domManip(arguments,true,false,function(elem){if(this.nodeType==1)this.appendChild(elem);});},prepend:function(){return this.domManip(arguments,true,true,function(elem){if(this.nodeType==1)this.insertBefore(elem,this.firstChild);});},before:function(){return this.domManip(arguments,false,false,function(elem){this.parentNode.insertBefore(elem,this);});},after:function(){return this.domManip(arguments,false,true,function(elem){this.parentNode.insertBefore(elem,this.nextSibling);});},end:function(){return this.prevObject||jQuery([]);},find:function(selector){var elems=jQuery.map(this,function(elem){return jQuery.find(selector,elem);});return this.pushStack(/[^+>] [^+>]/.test(selector)||selector.indexOf("..")>-1?jQuery.unique(elems):elems);},clone:function(events){var ret=this.map(function(){if(jQuery.browser.msie&&!jQuery.isXMLDoc(this)){var clone=this.cloneNode(true),container=document.createElement("div");container.appendChild(clone);return jQuery.clean([container.innerHTML])[0];}else
+return this.cloneNode(true);});var clone=ret.find("*").andSelf().each(function(){if(this[expando]!=undefined)this[expando]=null;});if(events===true)this.find("*").andSelf().each(function(i){if(this.nodeType==3)return;var events=jQuery.data(this,"events");for(var type in events)for(var handler in events[type])jQuery.event.add(clone[i],type,events[type][handler],events[type][handler].data);});return ret;},filter:function(selector){return this.pushStack(jQuery.isFunction(selector)&&jQuery.grep(this,function(elem,i){return selector.call(elem,i);})||jQuery.multiFilter(selector,this));},not:function(selector){if(selector.constructor==String)if(isSimple.test(selector))return this.pushStack(jQuery.multiFilter(selector,this,true));else
+selector=jQuery.multiFilter(selector,this);var isArrayLike=selector.length&&selector[selector.length-1]!==undefined&&!selector.nodeType;return this.filter(function(){return isArrayLike?jQuery.inArray(this,selector)<0:this!=selector;});},add:function(selector){return!selector?this:this.pushStack(jQuery.merge(this.get(),selector.constructor==String?jQuery(selector).get():selector.length!=undefined&&(!selector.nodeName||jQuery.nodeName(selector,"form"))?selector:[selector]));},is:function(selector){return selector?jQuery.multiFilter(selector,this).length>0:false;},hasClass:function(selector){return this.is("."+selector);},val:function(value){if(value==undefined){if(this.length){var elem=this[0];if(jQuery.nodeName(elem,"select")){var index=elem.selectedIndex,values=[],options=elem.options,one=elem.type=="select-one";if(index<0)return null;for(var i=one?index:0,max=one?index+1:options.length;i<max;i++){var option=options[i];if(option.selected){value=jQuery.browser.msie&&!option.attributes.value.specified?option.text:option.value;if(one)return value;values.push(value);}}return values;}else
+return(this[0].value||"").replace(/\r/g,"");}return undefined;}return this.each(function(){if(this.nodeType!=1)return;if(value.constructor==Array&&/radio|checkbox/.test(this.type))this.checked=(jQuery.inArray(this.value,value)>=0||jQuery.inArray(this.name,value)>=0);else if(jQuery.nodeName(this,"select")){var values=value.constructor==Array?value:[value];jQuery("option",this).each(function(){this.selected=(jQuery.inArray(this.value,values)>=0||jQuery.inArray(this.text,values)>=0);});if(!values.length)this.selectedIndex=-1;}else
+this.value=value;});},html:function(value){return value==undefined?(this.length?this[0].innerHTML:null):this.empty().append(value);},replaceWith:function(value){return this.after(value).remove();},eq:function(i){return this.slice(i,i+1);},slice:function(){return this.pushStack(Array.prototype.slice.apply(this,arguments));},map:function(callback){return this.pushStack(jQuery.map(this,function(elem,i){return callback.call(elem,i,elem);}));},andSelf:function(){return this.add(this.prevObject);},data:function(key,value){var parts=key.split(".");parts[1]=parts[1]?"."+parts[1]:"";if(value==null){var data=this.triggerHandler("getData"+parts[1]+"!",[parts[0]]);if(data==undefined&&this.length)data=jQuery.data(this[0],key);return data==null&&parts[1]?this.data(parts[0]):data;}else
+return this.trigger("setData"+parts[1]+"!",[parts[0],value]).each(function(){jQuery.data(this,key,value);});},removeData:function(key){return this.each(function(){jQuery.removeData(this,key);});},domManip:function(args,table,reverse,callback){var clone=this.length>1,elems;return this.each(function(){if(!elems){elems=jQuery.clean(args,this.ownerDocument);if(reverse)elems.reverse();}var obj=this;if(table&&jQuery.nodeName(this,"table")&&jQuery.nodeName(elems[0],"tr"))obj=this.getElementsByTagName("tbody")[0]||this.appendChild(this.ownerDocument.createElement("tbody"));var scripts=jQuery([]);jQuery.each(elems,function(){var elem=clone?jQuery(this).clone(true)[0]:this;if(jQuery.nodeName(elem,"script")){scripts=scripts.add(elem);}else{if(elem.nodeType==1)scripts=scripts.add(jQuery("script",elem).remove());callback.call(obj,elem);}});scripts.each(evalScript);});}};jQuery.prototype.init.prototype=jQuery.prototype;function evalScript(i,elem){if(elem.src)jQuery.ajax({url:elem.src,async:false,dataType:"script"});else
+jQuery.globalEval(elem.text||elem.textContent||elem.innerHTML||"");if(elem.parentNode)elem.parentNode.removeChild(elem);}jQuery.extend=jQuery.fn.extend=function(){var target=arguments[0]||{},i=1,length=arguments.length,deep=false,options;if(target.constructor==Boolean){deep=target;target=arguments[1]||{};i=2;}if(typeof target!="object"&&typeof target!="function")target={};if(length==1){target=this;i=0;}for(;i<length;i++)if((options=arguments[i])!=null)for(var name in options){if(target===options[name])continue;if(deep&&options[name]&&typeof options[name]=="object"&&target[name]&&!options[name].nodeType)target[name]=jQuery.extend(target[name],options[name]);else if(options[name]!=undefined)target[name]=options[name];}return target;};var expando="jQuery"+(new Date()).getTime(),uuid=0,windowData={};var exclude=/z-?index|font-?weight|opacity|zoom|line-?height/i;jQuery.extend({noConflict:function(deep){window.$=_$;if(deep)window.jQuery=_jQuery;return jQuery;},isFunction:function(fn){return!!fn&&typeof fn!="string"&&!fn.nodeName&&fn.constructor!=Array&&/function/i.test(fn+"");},isXMLDoc:function(elem){return elem.documentElement&&!elem.body||elem.tagName&&elem.ownerDocument&&!elem.ownerDocument.body;},globalEval:function(data){data=jQuery.trim(data);if(data){var head=document.getElementsByTagName("head")[0]||document.documentElement,script=document.createElement("script");script.type="text/javascript";if(jQuery.browser.msie)script.text=data;else
+script.appendChild(document.createTextNode(data));head.appendChild(script);head.removeChild(script);}},nodeName:function(elem,name){return elem.nodeName&&elem.nodeName.toUpperCase()==name.toUpperCase();},cache:{},data:function(elem,name,data){elem=elem==window?windowData:elem;var id=elem[expando];if(!id)id=elem[expando]=++uuid;if(name&&!jQuery.cache[id])jQuery.cache[id]={};if(data!=undefined)jQuery.cache[id][name]=data;return name?jQuery.cache[id][name]:id;},removeData:function(elem,name){elem=elem==window?windowData:elem;var id=elem[expando];if(name){if(jQuery.cache[id]){delete jQuery.cache[id][name];name="";for(name in jQuery.cache[id])break;if(!name)jQuery.removeData(elem);}}else{try{delete elem[expando];}catch(e){if(elem.removeAttribute)elem.removeAttribute(expando);}delete jQuery.cache[id];}},each:function(object,callback,args){if(args){if(object.length==undefined){for(var name in object)if(callback.apply(object[name],args)===false)break;}else
+for(var i=0,length=object.length;i<length;i++)if(callback.apply(object[i],args)===false)break;}else{if(object.length==undefined){for(var name in object)if(callback.call(object[name],name,object[name])===false)break;}else
+for(var i=0,length=object.length,value=object[0];i<length&&callback.call(value,i,value)!==false;value=object[++i]){}}return object;},prop:function(elem,value,type,i,name){if(jQuery.isFunction(value))value=value.call(elem,i);return value&&value.constructor==Number&&type=="curCSS"&&!exclude.test(name)?value+"px":value;},className:{add:function(elem,classNames){jQuery.each((classNames||"").split(/\s+/),function(i,className){if(elem.nodeType==1&&!jQuery.className.has(elem.className,className))elem.className+=(elem.className?" ":"")+className;});},remove:function(elem,classNames){if(elem.nodeType==1)elem.className=classNames!=undefined?jQuery.grep(elem.className.split(/\s+/),function(className){return!jQuery.className.has(classNames,className);}).join(" "):"";},has:function(elem,className){return jQuery.inArray(className,(elem.className||elem).toString().split(/\s+/))>-1;}},swap:function(elem,options,callback){var old={};for(var name in options){old[name]=elem.style[name];elem.style[name]=options[name];}callback.call(elem);for(var name in options)elem.style[name]=old[name];},css:function(elem,name,force){if(name=="width"||name=="height"){var val,props={position:"absolute",visibility:"hidden",display:"block"},which=name=="width"?["Left","Right"]:["Top","Bottom"];function getWH(){val=name=="width"?elem.offsetWidth:elem.offsetHeight;var padding=0,border=0;jQuery.each(which,function(){padding+=parseFloat(jQuery.curCSS(elem,"padding"+this,true))||0;border+=parseFloat(jQuery.curCSS(elem,"border"+this+"Width",true))||0;});val-=Math.round(padding+border);}if(jQuery(elem).is(":visible"))getWH();else
+jQuery.swap(elem,props,getWH);return Math.max(0,val);}return jQuery.curCSS(elem,name,force);},curCSS:function(elem,name,force){var ret;function color(elem){if(!jQuery.browser.safari)return false;var ret=document.defaultView.getComputedStyle(elem,null);return!ret||ret.getPropertyValue("color")=="";}if(name=="opacity"&&jQuery.browser.msie){ret=jQuery.attr(elem.style,"opacity");return ret==""?"1":ret;}if(jQuery.browser.opera&&name=="display"){var save=elem.style.outline;elem.style.outline="0 solid black";elem.style.outline=save;}if(name.match(/float/i))name=styleFloat;if(!force&&elem.style&&elem.style[name])ret=elem.style[name];else if(document.defaultView&&document.defaultView.getComputedStyle){if(name.match(/float/i))name="float";name=name.replace(/([A-Z])/g,"-$1").toLowerCase();var getComputedStyle=document.defaultView.getComputedStyle(elem,null);if(getComputedStyle&&!color(elem))ret=getComputedStyle.getPropertyValue(name);else{var swap=[],stack=[];for(var a=elem;a&&color(a);a=a.parentNode)stack.unshift(a);for(var i=0;i<stack.length;i++)if(color(stack[i])){swap[i]=stack[i].style.display;stack[i].style.display="block";}ret=name=="display"&&swap[stack.length-1]!=null?"none":(getComputedStyle&&getComputedStyle.getPropertyValue(name))||"";for(var i=0;i<swap.length;i++)if(swap[i]!=null)stack[i].style.display=swap[i];}if(name=="opacity"&&ret=="")ret="1";}else if(elem.currentStyle){var camelCase=name.replace(/\-(\w)/g,function(all,letter){return letter.toUpperCase();});ret=elem.currentStyle[name]||elem.currentStyle[camelCase];if(!/^\d+(px)?$/i.test(ret)&&/^\d/.test(ret)){var style=elem.style.left,runtimeStyle=elem.runtimeStyle.left;elem.runtimeStyle.left=elem.currentStyle.left;elem.style.left=ret||0;ret=elem.style.pixelLeft+"px";elem.style.left=style;elem.runtimeStyle.left=runtimeStyle;}}return ret;},clean:function(elems,context){var ret=[];context=context||document;if(typeof context.createElement=='undefined')context=context.ownerDocument||context[0]&&context[0].ownerDocument||document;jQuery.each(elems,function(i,elem){if(!elem)return;if(elem.constructor==Number)elem=elem.toString();if(typeof elem=="string"){elem=elem.replace(/(<(\w+)[^>]*?)\/>/g,function(all,front,tag){return tag.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i)?all:front+"></"+tag+">";});var tags=jQuery.trim(elem).toLowerCase(),div=context.createElement("div");var wrap=!tags.indexOf("<opt")&&[1,"<select multiple='multiple'>","</select>"]||!tags.indexOf("<leg")&&[1,"<fieldset>","</fieldset>"]||tags.match(/^<(thead|tbody|tfoot|colg|cap)/)&&[1,"<table>","</table>"]||!tags.indexOf("<tr")&&[2,"<table><tbody>","</tbody></table>"]||(!tags.indexOf("<td")||!tags.indexOf("<th"))&&[3,"<table><tbody><tr>","</tr></tbody></table>"]||!tags.indexOf("<col")&&[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"]||jQuery.browser.msie&&[1,"div<div>","</div>"]||[0,"",""];div.innerHTML=wrap[1]+elem+wrap[2];while(wrap[0]--)div=div.lastChild;if(jQuery.browser.msie){var tbody=!tags.indexOf("<table")&&tags.indexOf("<tbody")<0?div.firstChild&&div.firstChild.childNodes:wrap[1]=="<table>"&&tags.indexOf("<tbody")<0?div.childNodes:[];for(var j=tbody.length-1;j>=0;--j)if(jQuery.nodeName(tbody[j],"tbody")&&!tbody[j].childNodes.length)tbody[j].parentNode.removeChild(tbody[j]);if(/^\s/.test(elem))div.insertBefore(context.createTextNode(elem.match(/^\s*/)[0]),div.firstChild);}elem=jQuery.makeArray(div.childNodes);}if(elem.length===0&&(!jQuery.nodeName(elem,"form")&&!jQuery.nodeName(elem,"select")))return;if(elem[0]==undefined||jQuery.nodeName(elem,"form")||elem.options)ret.push(elem);else
+ret=jQuery.merge(ret,elem);});return ret;},attr:function(elem,name,value){if(!elem||elem.nodeType==3||elem.nodeType==8)return undefined;var fix=jQuery.isXMLDoc(elem)?{}:jQuery.props;if(name=="selected"&&jQuery.browser.safari)elem.parentNode.selectedIndex;if(fix[name]){if(value!=undefined)elem[fix[name]]=value;return elem[fix[name]];}else if(jQuery.browser.msie&&name=="style")return jQuery.attr(elem.style,"cssText",value);else if(value==undefined&&jQuery.browser.msie&&jQuery.nodeName(elem,"form")&&(name=="action"||name=="method"))return elem.getAttributeNode(name).nodeValue;else if(elem.tagName){if(value!=undefined){if(name=="type"&&jQuery.nodeName(elem,"input")&&elem.parentNode)throw"type property can't be changed";elem.setAttribute(name,""+value);}if(jQuery.browser.msie&&/href|src/.test(name)&&!jQuery.isXMLDoc(elem))return elem.getAttribute(name,2);return elem.getAttribute(name);}else{if(name=="opacity"&&jQuery.browser.msie){if(value!=undefined){elem.zoom=1;elem.filter=(elem.filter||"").replace(/alpha\([^)]*\)/,"")+(parseFloat(value).toString()=="NaN"?"":"alpha(opacity="+value*100+")");}return elem.filter&&elem.filter.indexOf("opacity=")>=0?(parseFloat(elem.filter.match(/opacity=([^)]*)/)[1])/100).toString():"";}name=name.replace(/-([a-z])/ig,function(all,letter){return letter.toUpperCase();});if(value!=undefined)elem[name]=value;return elem[name];}},trim:function(text){return(text||"").replace(/^\s+|\s+$/g,"");},makeArray:function(array){var ret=[];if(typeof array!="array")for(var i=0,length=array.length;i<length;i++)ret.push(array[i]);else
+ret=array.slice(0);return ret;},inArray:function(elem,array){for(var i=0,length=array.length;i<length;i++)if(array[i]==elem)return i;return-1;},merge:function(first,second){if(jQuery.browser.msie){for(var i=0;second[i];i++)if(second[i].nodeType!=8)first.push(second[i]);}else
+for(var i=0;second[i];i++)first.push(second[i]);return first;},unique:function(array){var ret=[],done={};try{for(var i=0,length=array.length;i<length;i++){var id=jQuery.data(array[i]);if(!done[id]){done[id]=true;ret.push(array[i]);}}}catch(e){ret=array;}return ret;},grep:function(elems,callback,inv){var ret=[];for(var i=0,length=elems.length;i<length;i++)if(!inv&&callback(elems[i],i)||inv&&!callback(elems[i],i))ret.push(elems[i]);return ret;},map:function(elems,callback){var ret=[];for(var i=0,length=elems.length;i<length;i++){var value=callback(elems[i],i);if(value!==null&&value!=undefined){if(value.constructor!=Array)value=[value];ret=ret.concat(value);}}return ret;}});var userAgent=navigator.userAgent.toLowerCase();jQuery.browser={version:(userAgent.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[])[1],safari:/webkit/.test(userAgent),opera:/opera/.test(userAgent),msie:/msie/.test(userAgent)&&!/opera/.test(userAgent),mozilla:/mozilla/.test(userAgent)&&!/(compatible|webkit)/.test(userAgent)};var styleFloat=jQuery.browser.msie?"styleFloat":"cssFloat";jQuery.extend({boxModel:!jQuery.browser.msie||document.compatMode=="CSS1Compat",props:{"for":"htmlFor","class":"className","float":styleFloat,cssFloat:styleFloat,styleFloat:styleFloat,innerHTML:"innerHTML",className:"className",value:"value",disabled:"disabled",checked:"checked",readonly:"readOnly",selected:"selected",maxlength:"maxLength",selectedIndex:"selectedIndex",defaultValue:"defaultValue",tagName:"tagName",nodeName:"nodeName"}});jQuery.each({parent:function(elem){return elem.parentNode;},parents:function(elem){return jQuery.dir(elem,"parentNode");},next:function(elem){return jQuery.nth(elem,2,"nextSibling");},prev:function(elem){return jQuery.nth(elem,2,"previousSibling");},nextAll:function(elem){return jQuery.dir(elem,"nextSibling");},prevAll:function(elem){return jQuery.dir(elem,"previousSibling");},siblings:function(elem){return jQuery.sibling(elem.parentNode.firstChild,elem);},children:function(elem){return jQuery.sibling(elem.firstChild);},contents:function(elem){return jQuery.nodeName(elem,"iframe")?elem.contentDocument||elem.contentWindow.document:jQuery.makeArray(elem.childNodes);}},function(name,fn){jQuery.fn[name]=function(selector){var ret=jQuery.map(this,fn);if(selector&&typeof selector=="string")ret=jQuery.multiFilter(selector,ret);return this.pushStack(jQuery.unique(ret));};});jQuery.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(name,original){jQuery.fn[name]=function(){var args=arguments;return this.each(function(){for(var i=0,length=args.length;i<length;i++)jQuery(args[i])[original](this);});};});jQuery.each({removeAttr:function(name){jQuery.attr(this,name,"");if(this.nodeType==1)this.removeAttribute(name);},addClass:function(classNames){jQuery.className.add(this,classNames);},removeClass:function(classNames){jQuery.className.remove(this,classNames);},toggleClass:function(classNames){jQuery.className[jQuery.className.has(this,classNames)?"remove":"add"](this,classNames);},remove:function(selector){if(!selector||jQuery.filter(selector,[this]).r.length){jQuery("*",this).add(this).each(function(){jQuery.event.remove(this);jQuery.removeData(this);});if(this.parentNode)this.parentNode.removeChild(this);}},empty:function(){jQuery(">*",this).remove();while(this.firstChild)this.removeChild(this.firstChild);}},function(name,fn){jQuery.fn[name]=function(){return this.each(fn,arguments);};});jQuery.each(["Height","Width"],function(i,name){var type=name.toLowerCase();jQuery.fn[type]=function(size){return this[0]==window?jQuery.browser.opera&&document.body["client"+name]||jQuery.browser.safari&&window["inner"+name]||document.compatMode=="CSS1Compat"&&document.documentElement["client"+name]||document.body["client"+name]:this[0]==document?Math.max(Math.max(document.body["scroll"+name],document.documentElement["scroll"+name]),Math.max(document.body["offset"+name],document.documentElement["offset"+name])):size==undefined?(this.length?jQuery.css(this[0],type):null):this.css(type,size.constructor==String?size:size+"px");};});var chars=jQuery.browser.safari&&parseInt(jQuery.browser.version)<417?"(?:[\\w*_-]|\\\\.)":"(?:[\\w\u0128-\uFFFF*_-]|\\\\.)",quickChild=new RegExp("^>\\s*("+chars+"+)"),quickID=new RegExp("^("+chars+"+)(#)("+chars+"+)"),quickClass=new RegExp("^([#.]?)("+chars+"*)");jQuery.extend({expr:{"":function(a,i,m){return m[2]=="*"||jQuery.nodeName(a,m[2]);},"#":function(a,i,m){return a.getAttribute("id")==m[2];},":":{lt:function(a,i,m){return i<m[3]-0;},gt:function(a,i,m){return i>m[3]-0;},nth:function(a,i,m){return m[3]-0==i;},eq:function(a,i,m){return m[3]-0==i;},first:function(a,i){return i==0;},last:function(a,i,m,r){return i==r.length-1;},even:function(a,i){return i%2==0;},odd:function(a,i){return i%2;},"first-child":function(a){return a.parentNode.getElementsByTagName("*")[0]==a;},"last-child":function(a){return jQuery.nth(a.parentNode.lastChild,1,"previousSibling")==a;},"only-child":function(a){return!jQuery.nth(a.parentNode.lastChild,2,"previousSibling");},parent:function(a){return a.firstChild;},empty:function(a){return!a.firstChild;},contains:function(a,i,m){return(a.textContent||a.innerText||jQuery(a).text()||"").indexOf(m[3])>=0;},visible:function(a){return"hidden"!=a.type&&jQuery.css(a,"display")!="none"&&jQuery.css(a,"visibility")!="hidden";},hidden:function(a){return"hidden"==a.type||jQuery.css(a,"display")=="none"||jQuery.css(a,"visibility")=="hidden";},enabled:function(a){return!a.disabled;},disabled:function(a){return a.disabled;},checked:function(a){return a.checked;},selected:function(a){return a.selected||jQuery.attr(a,"selected");},text:function(a){return"text"==a.type;},radio:function(a){return"radio"==a.type;},checkbox:function(a){return"checkbox"==a.type;},file:function(a){return"file"==a.type;},password:function(a){return"password"==a.type;},submit:function(a){return"submit"==a.type;},image:function(a){return"image"==a.type;},reset:function(a){return"reset"==a.type;},button:function(a){return"button"==a.type||jQuery.nodeName(a,"button");},input:function(a){return/input|select|textarea|button/i.test(a.nodeName);},has:function(a,i,m){return jQuery.find(m[3],a).length;},header:function(a){return/h\d/i.test(a.nodeName);},animated:function(a){return jQuery.grep(jQuery.timers,function(fn){return a==fn.elem;}).length;}}},parse:[/^(\[) *@?([\w-]+) *([!*$^~=]*) *('?"?)(.*?)\4 *\]/,/^(:)([\w-]+)\("?'?(.*?(\(.*?\))?[^(]*?)"?'?\)/,new RegExp("^([:.#]*)("+chars+"+)")],multiFilter:function(expr,elems,not){var old,cur=[];while(expr&&expr!=old){old=expr;var f=jQuery.filter(expr,elems,not);expr=f.t.replace(/^\s*,\s*/,"");cur=not?elems=f.r:jQuery.merge(cur,f.r);}return cur;},find:function(t,context){if(typeof t!="string")return[t];if(context&&context.nodeType!=1&&context.nodeType!=9)return[];context=context||document;var ret=[context],done=[],last,nodeName;while(t&&last!=t){var r=[];last=t;t=jQuery.trim(t);var foundToken=false;var re=quickChild;var m=re.exec(t);if(m){nodeName=m[1].toUpperCase();for(var i=0;ret[i];i++)for(var c=ret[i].firstChild;c;c=c.nextSibling)if(c.nodeType==1&&(nodeName=="*"||c.nodeName.toUpperCase()==nodeName))r.push(c);ret=r;t=t.replace(re,"");if(t.indexOf(" ")==0)continue;foundToken=true;}else{re=/^([>+~])\s*(\w*)/i;if((m=re.exec(t))!=null){r=[];var merge={};nodeName=m[2].toUpperCase();m=m[1];for(var j=0,rl=ret.length;j<rl;j++){var n=m=="~"||m=="+"?ret[j].nextSibling:ret[j].firstChild;for(;n;n=n.nextSibling)if(n.nodeType==1){var id=jQuery.data(n);if(m=="~"&&merge[id])break;if(!nodeName||n.nodeName.toUpperCase()==nodeName){if(m=="~")merge[id]=true;r.push(n);}if(m=="+")break;}}ret=r;t=jQuery.trim(t.replace(re,""));foundToken=true;}}if(t&&!foundToken){if(!t.indexOf(",")){if(context==ret[0])ret.shift();done=jQuery.merge(done,ret);r=ret=[context];t=" "+t.substr(1,t.length);}else{var re2=quickID;var m=re2.exec(t);if(m){m=[0,m[2],m[3],m[1]];}else{re2=quickClass;m=re2.exec(t);}m[2]=m[2].replace(/\\/g,"");var elem=ret[ret.length-1];if(m[1]=="#"&&elem&&elem.getElementById&&!jQuery.isXMLDoc(elem)){var oid=elem.getElementById(m[2]);if((jQuery.browser.msie||jQuery.browser.opera)&&oid&&typeof oid.id=="string"&&oid.id!=m[2])oid=jQuery('[@id="'+m[2]+'"]',elem)[0];ret=r=oid&&(!m[3]||jQuery.nodeName(oid,m[3]))?[oid]:[];}else{for(var i=0;ret[i];i++){var tag=m[1]=="#"&&m[3]?m[3]:m[1]!=""||m[0]==""?"*":m[2];if(tag=="*"&&ret[i].nodeName.toLowerCase()=="object")tag="param";r=jQuery.merge(r,ret[i].getElementsByTagName(tag));}if(m[1]==".")r=jQuery.classFilter(r,m[2]);if(m[1]=="#"){var tmp=[];for(var i=0;r[i];i++)if(r[i].getAttribute("id")==m[2]){tmp=[r[i]];break;}r=tmp;}ret=r;}t=t.replace(re2,"");}}if(t){var val=jQuery.filter(t,r);ret=r=val.r;t=jQuery.trim(val.t);}}if(t)ret=[];if(ret&&context==ret[0])ret.shift();done=jQuery.merge(done,ret);return done;},classFilter:function(r,m,not){m=" "+m+" ";var tmp=[];for(var i=0;r[i];i++){var pass=(" "+r[i].className+" ").indexOf(m)>=0;if(!not&&pass||not&&!pass)tmp.push(r[i]);}return tmp;},filter:function(t,r,not){var last;while(t&&t!=last){last=t;var p=jQuery.parse,m;for(var i=0;p[i];i++){m=p[i].exec(t);if(m){t=t.substring(m[0].length);m[2]=m[2].replace(/\\/g,"");break;}}if(!m)break;if(m[1]==":"&&m[2]=="not")r=isSimple.test(m[3])?jQuery.filter(m[3],r,true).r:jQuery(r).not(m[3]);else if(m[1]==".")r=jQuery.classFilter(r,m[2],not);else if(m[1]=="["){var tmp=[],type=m[3];for(var i=0,rl=r.length;i<rl;i++){var a=r[i],z=a[jQuery.props[m[2]]||m[2]];if(z==null||/href|src|selected/.test(m[2]))z=jQuery.attr(a,m[2])||'';if((type==""&&!!z||type=="="&&z==m[5]||type=="!="&&z!=m[5]||type=="^="&&z&&!z.indexOf(m[5])||type=="$="&&z.substr(z.length-m[5].length)==m[5]||(type=="*="||type=="~=")&&z.indexOf(m[5])>=0)^not)tmp.push(a);}r=tmp;}else if(m[1]==":"&&m[2]=="nth-child"){var merge={},tmp=[],test=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(m[3]=="even"&&"2n"||m[3]=="odd"&&"2n+1"||!/\D/.test(m[3])&&"0n+"+m[3]||m[3]),first=(test[1]+(test[2]||1))-0,last=test[3]-0;for(var i=0,rl=r.length;i<rl;i++){var node=r[i],parentNode=node.parentNode,id=jQuery.data(parentNode);if(!merge[id]){var c=1;for(var n=parentNode.firstChild;n;n=n.nextSibling)if(n.nodeType==1)n.nodeIndex=c++;merge[id]=true;}var add=false;if(first==0){if(node.nodeIndex==last)add=true;}else if((node.nodeIndex-last)%first==0&&(node.nodeIndex-last)/first>=0)add=true;if(add^not)tmp.push(node);}r=tmp;}else{var fn=jQuery.expr[m[1]];if(typeof fn=="object")fn=fn[m[2]];if(typeof fn=="string")fn=eval("false||function(a,i){return "+fn+";}");r=jQuery.grep(r,function(elem,i){return fn(elem,i,m,r);},not);}}return{r:r,t:t};},dir:function(elem,dir){var matched=[];var cur=elem[dir];while(cur&&cur!=document){if(cur.nodeType==1)matched.push(cur);cur=cur[dir];}return matched;},nth:function(cur,result,dir,elem){result=result||1;var num=0;for(;cur;cur=cur[dir])if(cur.nodeType==1&&++num==result)break;return cur;},sibling:function(n,elem){var r=[];for(;n;n=n.nextSibling){if(n.nodeType==1&&(!elem||n!=elem))r.push(n);}return r;}});jQuery.event={add:function(elem,types,handler,data){if(elem.nodeType==3||elem.nodeType==8)return;if(jQuery.browser.msie&&elem.setInterval!=undefined)elem=window;if(!handler.guid)handler.guid=this.guid++;if(data!=undefined){var fn=handler;handler=function(){return fn.apply(this,arguments);};handler.data=data;handler.guid=fn.guid;}var events=jQuery.data(elem,"events")||jQuery.data(elem,"events",{}),handle=jQuery.data(elem,"handle")||jQuery.data(elem,"handle",function(){var val;if(typeof jQuery=="undefined"||jQuery.event.triggered)return val;val=jQuery.event.handle.apply(arguments.callee.elem,arguments);return val;});handle.elem=elem;jQuery.each(types.split(/\s+/),function(index,type){var parts=type.split(".");type=parts[0];handler.type=parts[1];var handlers=events[type];if(!handlers){handlers=events[type]={};if(!jQuery.event.special[type]||jQuery.event.special[type].setup.call(elem)===false){if(elem.addEventListener)elem.addEventListener(type,handle,false);else if(elem.attachEvent)elem.attachEvent("on"+type,handle);}}handlers[handler.guid]=handler;jQuery.event.global[type]=true;});elem=null;},guid:1,global:{},remove:function(elem,types,handler){if(elem.nodeType==3||elem.nodeType==8)return;var events=jQuery.data(elem,"events"),ret,index;if(events){if(types==undefined||(typeof types=="string"&&types.charAt(0)=="."))for(var type in events)this.remove(elem,type+(types||""));else{if(types.type){handler=types.handler;types=types.type;}jQuery.each(types.split(/\s+/),function(index,type){var parts=type.split(".");type=parts[0];if(events[type]){if(handler)delete events[type][handler.guid];else
+for(handler in events[type])if(!parts[1]||events[type][handler].type==parts[1])delete events[type][handler];for(ret in events[type])break;if(!ret){if(!jQuery.event.special[type]||jQuery.event.special[type].teardown.call(elem)===false){if(elem.removeEventListener)elem.removeEventListener(type,jQuery.data(elem,"handle"),false);else if(elem.detachEvent)elem.detachEvent("on"+type,jQuery.data(elem,"handle"));}ret=null;delete events[type];}}});}for(ret in events)break;if(!ret){var handle=jQuery.data(elem,"handle");if(handle)handle.elem=null;jQuery.removeData(elem,"events");jQuery.removeData(elem,"handle");}}},trigger:function(type,data,elem,donative,extra){data=jQuery.makeArray(data||[]);if(type.indexOf("!")>=0){type=type.slice(0,-1);var exclusive=true;}if(!elem){if(this.global[type])jQuery("*").add([window,document]).trigger(type,data);}else{if(elem.nodeType==3||elem.nodeType==8)return undefined;var val,ret,fn=jQuery.isFunction(elem[type]||null),event=!data[0]||!data[0].preventDefault;if(event)data.unshift(this.fix({type:type,target:elem}));data[0].type=type;if(exclusive)data[0].exclusive=true;if(jQuery.isFunction(jQuery.data(elem,"handle")))val=jQuery.data(elem,"handle").apply(elem,data);if(!fn&&elem["on"+type]&&elem["on"+type].apply(elem,data)===false)val=false;if(event)data.shift();if(extra&&jQuery.isFunction(extra)){ret=extra.apply(elem,val==null?data:data.concat(val));if(ret!==undefined)val=ret;}if(fn&&donative!==false&&val!==false&&!(jQuery.nodeName(elem,'a')&&type=="click")){this.triggered=true;try{elem[type]();}catch(e){}}this.triggered=false;}return val;},handle:function(event){var val;event=jQuery.event.fix(event||window.event||{});var parts=event.type.split(".");event.type=parts[0];var handlers=jQuery.data(this,"events")&&jQuery.data(this,"events")[event.type],args=Array.prototype.slice.call(arguments,1);args.unshift(event);for(var j in handlers){var handler=handlers[j];args[0].handler=handler;args[0].data=handler.data;if(!parts[1]&&!event.exclusive||handler.type==parts[1]){var ret=handler.apply(this,args);if(val!==false)val=ret;if(ret===false){event.preventDefault();event.stopPropagation();}}}if(jQuery.browser.msie)event.target=event.preventDefault=event.stopPropagation=event.handler=event.data=null;return val;},fix:function(event){var originalEvent=event;event=jQuery.extend({},originalEvent);event.preventDefault=function(){if(originalEvent.preventDefault)originalEvent.preventDefault();originalEvent.returnValue=false;};event.stopPropagation=function(){if(originalEvent.stopPropagation)originalEvent.stopPropagation();originalEvent.cancelBubble=true;};if(!event.target)event.target=event.srcElement||document;if(event.target.nodeType==3)event.target=originalEvent.target.parentNode;if(!event.relatedTarget&&event.fromElement)event.relatedTarget=event.fromElement==event.target?event.toElement:event.fromElement;if(event.pageX==null&&event.clientX!=null){var doc=document.documentElement,body=document.body;event.pageX=event.clientX+(doc&&doc.scrollLeft||body&&body.scrollLeft||0)-(doc.clientLeft||0);event.pageY=event.clientY+(doc&&doc.scrollTop||body&&body.scrollTop||0)-(doc.clientTop||0);}if(!event.which&&((event.charCode||event.charCode===0)?event.charCode:event.keyCode))event.which=event.charCode||event.keyCode;if(!event.metaKey&&event.ctrlKey)event.metaKey=event.ctrlKey;if(!event.which&&event.button)event.which=(event.button&1?1:(event.button&2?3:(event.button&4?2:0)));return event;},special:{ready:{setup:function(){bindReady();return;},teardown:function(){return;}},mouseenter:{setup:function(){if(jQuery.browser.msie)return false;jQuery(this).bind("mouseover",jQuery.event.special.mouseenter.handler);return true;},teardown:function(){if(jQuery.browser.msie)return false;jQuery(this).unbind("mouseover",jQuery.event.special.mouseenter.handler);return true;},handler:function(event){if(withinElement(event,this))return true;arguments[0].type="mouseenter";return jQuery.event.handle.apply(this,arguments);}},mouseleave:{setup:function(){if(jQuery.browser.msie)return false;jQuery(this).bind("mouseout",jQuery.event.special.mouseleave.handler);return true;},teardown:function(){if(jQuery.browser.msie)return false;jQuery(this).unbind("mouseout",jQuery.event.special.mouseleave.handler);return true;},handler:function(event){if(withinElement(event,this))return true;arguments[0].type="mouseleave";return jQuery.event.handle.apply(this,arguments);}}}};jQuery.fn.extend({bind:function(type,data,fn){return type=="unload"?this.one(type,data,fn):this.each(function(){jQuery.event.add(this,type,fn||data,fn&&data);});},one:function(type,data,fn){return this.each(function(){jQuery.event.add(this,type,function(event){jQuery(this).unbind(event);return(fn||data).apply(this,arguments);},fn&&data);});},unbind:function(type,fn){return this.each(function(){jQuery.event.remove(this,type,fn);});},trigger:function(type,data,fn){return this.each(function(){jQuery.event.trigger(type,data,this,true,fn);});},triggerHandler:function(type,data,fn){if(this[0])return jQuery.event.trigger(type,data,this[0],false,fn);return undefined;},toggle:function(){var args=arguments;return this.click(function(event){this.lastToggle=0==this.lastToggle?1:0;event.preventDefault();return args[this.lastToggle].apply(this,arguments)||false;});},hover:function(fnOver,fnOut){return this.bind('mouseenter',fnOver).bind('mouseleave',fnOut);},ready:function(fn){bindReady();if(jQuery.isReady)fn.call(document,jQuery);else
+jQuery.readyList.push(function(){return fn.call(this,jQuery);});return this;}});jQuery.extend({isReady:false,readyList:[],ready:function(){if(!jQuery.isReady){jQuery.isReady=true;if(jQuery.readyList){jQuery.each(jQuery.readyList,function(){this.apply(document);});jQuery.readyList=null;}jQuery(document).triggerHandler("ready");}}});var readyBound=false;function bindReady(){if(readyBound)return;readyBound=true;if(document.addEventListener&&!jQuery.browser.opera)document.addEventListener("DOMContentLoaded",jQuery.ready,false);if(jQuery.browser.msie&&window==top)(function(){if(jQuery.isReady)return;try{document.documentElement.doScroll("left");}catch(error){setTimeout(arguments.callee,0);return;}jQuery.ready();})();if(jQuery.browser.opera)document.addEventListener("DOMContentLoaded",function(){if(jQuery.isReady)return;for(var i=0;i<document.styleSheets.length;i++)if(document.styleSheets[i].disabled){setTimeout(arguments.callee,0);return;}jQuery.ready();},false);if(jQuery.browser.safari){var numStyles;(function(){if(jQuery.isReady)return;if(document.readyState!="loaded"&&document.readyState!="complete"){setTimeout(arguments.callee,0);return;}if(numStyles===undefined)numStyles=jQuery("style, link[rel=stylesheet]").length;if(document.styleSheets.length!=numStyles){setTimeout(arguments.callee,0);return;}jQuery.ready();})();}jQuery.event.add(window,"load",jQuery.ready);}jQuery.each(("blur,focus,load,resize,scroll,unload,click,dblclick,"+"mousedown,mouseup,mousemove,mouseover,mouseout,change,select,"+"submit,keydown,keypress,keyup,error").split(","),function(i,name){jQuery.fn[name]=function(fn){return fn?this.bind(name,fn):this.trigger(name);};});var withinElement=function(event,elem){var parent=event.relatedTarget;while(parent&&parent!=elem)try{parent=parent.parentNode;}catch(error){parent=elem;}return parent==elem;};jQuery(window).bind("unload",function(){jQuery("*").add(document).unbind();});jQuery.fn.extend({load:function(url,params,callback){if(jQuery.isFunction(url))return this.bind("load",url);var off=url.indexOf(" ");if(off>=0){var selector=url.slice(off,url.length);url=url.slice(0,off);}callback=callback||function(){};var type="GET";if(params)if(jQuery.isFunction(params)){callback=params;params=null;}else{params=jQuery.param(params);type="POST";}var self=this;jQuery.ajax({url:url,type:type,dataType:"html",data:params,complete:function(res,status){if(status=="success"||status=="notmodified")self.html(selector?jQuery("<div/>").append(res.responseText.replace(/<script(.|\s)*?\/script>/g,"")).find(selector):res.responseText);self.each(callback,[res.responseText,status,res]);}});return this;},serialize:function(){return jQuery.param(this.serializeArray());},serializeArray:function(){return this.map(function(){return jQuery.nodeName(this,"form")?jQuery.makeArray(this.elements):this;}).filter(function(){return this.name&&!this.disabled&&(this.checked||/select|textarea/i.test(this.nodeName)||/text|hidden|password/i.test(this.type));}).map(function(i,elem){var val=jQuery(this).val();return val==null?null:val.constructor==Array?jQuery.map(val,function(val,i){return{name:elem.name,value:val};}):{name:elem.name,value:val};}).get();}});jQuery.each("ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","),function(i,o){jQuery.fn[o]=function(f){return this.bind(o,f);};});var jsc=(new Date).getTime();jQuery.extend({get:function(url,data,callback,type){if(jQuery.isFunction(data)){callback=data;data=null;}return jQuery.ajax({type:"GET",url:url,data:data,success:callback,dataType:type});},getScript:function(url,callback){return jQuery.get(url,null,callback,"script");},getJSON:function(url,data,callback){return jQuery.get(url,data,callback,"json");},post:function(url,data,callback,type){if(jQuery.isFunction(data)){callback=data;data={};}return jQuery.ajax({type:"POST",url:url,data:data,success:callback,dataType:type});},ajaxSetup:function(settings){jQuery.extend(jQuery.ajaxSettings,settings);},ajaxSettings:{global:true,type:"GET",timeout:0,contentType:"application/x-www-form-urlencoded",processData:true,async:true,data:null,username:null,password:null,accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},ajax:function(s){var jsonp,jsre=/=\?(&|$)/g,status,data;s=jQuery.extend(true,s,jQuery.extend(true,{},jQuery.ajaxSettings,s));if(s.data&&s.processData&&typeof s.data!="string")s.data=jQuery.param(s.data);if(s.dataType=="jsonp"){if(s.type.toLowerCase()=="get"){if(!s.url.match(jsre))s.url+=(s.url.match(/\?/)?"&":"?")+(s.jsonp||"callback")+"=?";}else if(!s.data||!s.data.match(jsre))s.data=(s.data?s.data+"&":"")+(s.jsonp||"callback")+"=?";s.dataType="json";}if(s.dataType=="json"&&(s.data&&s.data.match(jsre)||s.url.match(jsre))){jsonp="jsonp"+jsc++;if(s.data)s.data=(s.data+"").replace(jsre,"="+jsonp+"$1");s.url=s.url.replace(jsre,"="+jsonp+"$1");s.dataType="script";window[jsonp]=function(tmp){data=tmp;success();complete();window[jsonp]=undefined;try{delete window[jsonp];}catch(e){}if(head)head.removeChild(script);};}if(s.dataType=="script"&&s.cache==null)s.cache=false;if(s.cache===false&&s.type.toLowerCase()=="get"){var ts=(new Date()).getTime();var ret=s.url.replace(/(\?|&)_=.*?(&|$)/,"$1_="+ts+"$2");s.url=ret+((ret==s.url)?(s.url.match(/\?/)?"&":"?")+"_="+ts:"");}if(s.data&&s.type.toLowerCase()=="get"){s.url+=(s.url.match(/\?/)?"&":"?")+s.data;s.data=null;}if(s.global&&!jQuery.active++)jQuery.event.trigger("ajaxStart");if((!s.url.indexOf("http")||!s.url.indexOf("//"))&&s.dataType=="script"&&s.type.toLowerCase()=="get"){var head=document.getElementsByTagName("head")[0];var script=document.createElement("script");script.src=s.url;if(s.scriptCharset)script.charset=s.scriptCharset;if(!jsonp){var done=false;script.onload=script.onreadystatechange=function(){if(!done&&(!this.readyState||this.readyState=="loaded"||this.readyState=="complete")){done=true;success();complete();head.removeChild(script);}};}head.appendChild(script);return undefined;}var requestDone=false;var xml=window.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest();xml.open(s.type,s.url,s.async,s.username,s.password);try{if(s.data)xml.setRequestHeader("Content-Type",s.contentType);if(s.ifModified)xml.setRequestHeader("If-Modified-Since",jQuery.lastModified[s.url]||"Thu, 01 Jan 1970 00:00:00 GMT");xml.setRequestHeader("X-Requested-With","XMLHttpRequest");xml.setRequestHeader("Accept",s.dataType&&s.accepts[s.dataType]?s.accepts[s.dataType]+", */*":s.accepts._default);}catch(e){}if(s.beforeSend)s.beforeSend(xml);if(s.global)jQuery.event.trigger("ajaxSend",[xml,s]);var onreadystatechange=function(isTimeout){if(!requestDone&&xml&&(xml.readyState==4||isTimeout=="timeout")){requestDone=true;if(ival){clearInterval(ival);ival=null;}status=isTimeout=="timeout"&&"timeout"||!jQuery.httpSuccess(xml)&&"error"||s.ifModified&&jQuery.httpNotModified(xml,s.url)&&"notmodified"||"success";if(status=="success"){try{data=jQuery.httpData(xml,s.dataType);}catch(e){status="parsererror";}}if(status=="success"){var modRes;try{modRes=xml.getResponseHeader("Last-Modified");}catch(e){}if(s.ifModified&&modRes)jQuery.lastModified[s.url]=modRes;if(!jsonp)success();}else
+jQuery.handleError(s,xml,status);complete();if(s.async)xml=null;}};if(s.async){var ival=setInterval(onreadystatechange,13);if(s.timeout>0)setTimeout(function(){if(xml){xml.abort();if(!requestDone)onreadystatechange("timeout");}},s.timeout);}try{xml.send(s.data);}catch(e){jQuery.handleError(s,xml,null,e);}if(!s.async)onreadystatechange();function success(){if(s.success)s.success(data,status);if(s.global)jQuery.event.trigger("ajaxSuccess",[xml,s]);}function complete(){if(s.complete)s.complete(xml,status);if(s.global)jQuery.event.trigger("ajaxComplete",[xml,s]);if(s.global&&!--jQuery.active)jQuery.event.trigger("ajaxStop");}return xml;},handleError:function(s,xml,status,e){if(s.error)s.error(xml,status,e);if(s.global)jQuery.event.trigger("ajaxError",[xml,s,e]);},active:0,httpSuccess:function(r){try{return!r.status&&location.protocol=="file:"||(r.status>=200&&r.status<300)||r.status==304||r.status==1223||jQuery.browser.safari&&r.status==undefined;}catch(e){}return false;},httpNotModified:function(xml,url){try{var xmlRes=xml.getResponseHeader("Last-Modified");return xml.status==304||xmlRes==jQuery.lastModified[url]||jQuery.browser.safari&&xml.status==undefined;}catch(e){}return false;},httpData:function(r,type){var ct=r.getResponseHeader("content-type");var xml=type=="xml"||!type&&ct&&ct.indexOf("xml")>=0;var data=xml?r.responseXML:r.responseText;if(xml&&data.documentElement.tagName=="parsererror")throw"parsererror";if(type=="script")jQuery.globalEval(data);if(type=="json")data=eval("("+data+")");return data;},param:function(a){var s=[];if(a.constructor==Array||a.jquery)jQuery.each(a,function(){s.push(encodeURIComponent(this.name)+"="+encodeURIComponent(this.value));});else
+for(var j in a)if(a[j]&&a[j].constructor==Array)jQuery.each(a[j],function(){s.push(encodeURIComponent(j)+"="+encodeURIComponent(this));});else
+s.push(encodeURIComponent(j)+"="+encodeURIComponent(a[j]));return s.join("&").replace(/%20/g,"+");}});jQuery.fn.extend({show:function(speed,callback){return speed?this.animate({height:"show",width:"show",opacity:"show"},speed,callback):this.filter(":hidden").each(function(){this.style.display=this.oldblock||"";if(jQuery.css(this,"display")=="none"){var elem=jQuery("<"+this.tagName+" />").appendTo("body");this.style.display=elem.css("display");if(this.style.display=="none")this.style.display="block";elem.remove();}}).end();},hide:function(speed,callback){return speed?this.animate({height:"hide",width:"hide",opacity:"hide"},speed,callback):this.filter(":visible").each(function(){this.oldblock=this.oldblock||jQuery.css(this,"display");this.style.display="none";}).end();},_toggle:jQuery.fn.toggle,toggle:function(fn,fn2){return jQuery.isFunction(fn)&&jQuery.isFunction(fn2)?this._toggle(fn,fn2):fn?this.animate({height:"toggle",width:"toggle",opacity:"toggle"},fn,fn2):this.each(function(){jQuery(this)[jQuery(this).is(":hidden")?"show":"hide"]();});},slideDown:function(speed,callback){return this.animate({height:"show"},speed,callback);},slideUp:function(speed,callback){return this.animate({height:"hide"},speed,callback);},slideToggle:function(speed,callback){return this.animate({height:"toggle"},speed,callback);},fadeIn:function(speed,callback){return this.animate({opacity:"show"},speed,callback);},fadeOut:function(speed,callback){return this.animate({opacity:"hide"},speed,callback);},fadeTo:function(speed,to,callback){return this.animate({opacity:to},speed,callback);},animate:function(prop,speed,easing,callback){var optall=jQuery.speed(speed,easing,callback);return this[optall.queue===false?"each":"queue"](function(){if(this.nodeType!=1)return false;var opt=jQuery.extend({},optall);var hidden=jQuery(this).is(":hidden"),self=this;for(var p in prop){if(prop[p]=="hide"&&hidden||prop[p]=="show"&&!hidden)return jQuery.isFunction(opt.complete)&&opt.complete.apply(this);if(p=="height"||p=="width"){opt.display=jQuery.css(this,"display");opt.overflow=this.style.overflow;}}if(opt.overflow!=null)this.style.overflow="hidden";opt.curAnim=jQuery.extend({},prop);jQuery.each(prop,function(name,val){var e=new jQuery.fx(self,opt,name);if(/toggle|show|hide/.test(val))e[val=="toggle"?hidden?"show":"hide":val](prop);else{var parts=val.toString().match(/^([+-]=)?([\d+-.]+)(.*)$/),start=e.cur(true)||0;if(parts){var end=parseFloat(parts[2]),unit=parts[3]||"px";if(unit!="px"){self.style[name]=(end||1)+unit;start=((end||1)/e.cur(true))*start;self.style[name]=start+unit;}if(parts[1])end=((parts[1]=="-="?-1:1)*end)+start;e.custom(start,end,unit);}else
+e.custom(start,val,"");}});return true;});},queue:function(type,fn){if(jQuery.isFunction(type)||(type&&type.constructor==Array)){fn=type;type="fx";}if(!type||(typeof type=="string"&&!fn))return queue(this[0],type);return this.each(function(){if(fn.constructor==Array)queue(this,type,fn);else{queue(this,type).push(fn);if(queue(this,type).length==1)fn.apply(this);}});},stop:function(clearQueue,gotoEnd){var timers=jQuery.timers;if(clearQueue)this.queue([]);this.each(function(){for(var i=timers.length-1;i>=0;i--)if(timers[i].elem==this){if(gotoEnd)timers[i](true);timers.splice(i,1);}});if(!gotoEnd)this.dequeue();return this;}});var queue=function(elem,type,array){if(!elem)return undefined;type=type||"fx";var q=jQuery.data(elem,type+"queue");if(!q||array)q=jQuery.data(elem,type+"queue",array?jQuery.makeArray(array):[]);return q;};jQuery.fn.dequeue=function(type){type=type||"fx";return this.each(function(){var q=queue(this,type);q.shift();if(q.length)q[0].apply(this);});};jQuery.extend({speed:function(speed,easing,fn){var opt=speed&&speed.constructor==Object?speed:{complete:fn||!fn&&easing||jQuery.isFunction(speed)&&speed,duration:speed,easing:fn&&easing||easing&&easing.constructor!=Function&&easing};opt.duration=(opt.duration&&opt.duration.constructor==Number?opt.duration:{slow:600,fast:200}[opt.duration])||400;opt.old=opt.complete;opt.complete=function(){if(opt.queue!==false)jQuery(this).dequeue();if(jQuery.isFunction(opt.old))opt.old.apply(this);};return opt;},easing:{linear:function(p,n,firstNum,diff){return firstNum+diff*p;},swing:function(p,n,firstNum,diff){return((-Math.cos(p*Math.PI)/2)+0.5)*diff+firstNum;}},timers:[],timerId:null,fx:function(elem,options,prop){this.options=options;this.elem=elem;this.prop=prop;if(!options.orig)options.orig={};}});jQuery.fx.prototype={update:function(){if(this.options.step)this.options.step.apply(this.elem,[this.now,this]);(jQuery.fx.step[this.prop]||jQuery.fx.step._default)(this);if(this.prop=="height"||this.prop=="width")this.elem.style.display="block";},cur:function(force){if(this.elem[this.prop]!=null&&this.elem.style[this.prop]==null)return this.elem[this.prop];var r=parseFloat(jQuery.css(this.elem,this.prop,force));return r&&r>-10000?r:parseFloat(jQuery.curCSS(this.elem,this.prop))||0;},custom:function(from,to,unit){this.startTime=(new Date()).getTime();this.start=from;this.end=to;this.unit=unit||this.unit||"px";this.now=this.start;this.pos=this.state=0;this.update();var self=this;function t(gotoEnd){return self.step(gotoEnd);}t.elem=this.elem;jQuery.timers.push(t);if(jQuery.timerId==null){jQuery.timerId=setInterval(function(){var timers=jQuery.timers;for(var i=0;i<timers.length;i++)if(!timers[i]())timers.splice(i--,1);if(!timers.length){clearInterval(jQuery.timerId);jQuery.timerId=null;}},13);}},show:function(){this.options.orig[this.prop]=jQuery.attr(this.elem.style,this.prop);this.options.show=true;this.custom(0,this.cur());if(this.prop=="width"||this.prop=="height")this.elem.style[this.prop]="1px";jQuery(this.elem).show();},hide:function(){this.options.orig[this.prop]=jQuery.attr(this.elem.style,this.prop);this.options.hide=true;this.custom(this.cur(),0);},step:function(gotoEnd){var t=(new Date()).getTime();if(gotoEnd||t>this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;var done=true;for(var i in this.options.curAnim)if(this.options.curAnim[i]!==true)done=false;if(done){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;this.elem.style.display=this.options.display;if(jQuery.css(this.elem,"display")=="none")this.elem.style.display="block";}if(this.options.hide)this.elem.style.display="none";if(this.options.hide||this.options.show)for(var p in this.options.curAnim)jQuery.attr(this.elem.style,p,this.options.orig[p]);}if(done&&jQuery.isFunction(this.options.complete))this.options.complete.apply(this.elem);return false;}else{var n=t-this.startTime;this.state=n/this.options.duration;this.pos=jQuery.easing[this.options.easing||(jQuery.easing.swing?"swing":"linear")](this.state,n,0,1,this.options.duration);this.now=this.start+((this.end-this.start)*this.pos);this.update();}return true;}};jQuery.fx.step={scrollLeft:function(fx){fx.elem.scrollLeft=fx.now;},scrollTop:function(fx){fx.elem.scrollTop=fx.now;},opacity:function(fx){jQuery.attr(fx.elem.style,"opacity",fx.now);},_default:function(fx){fx.elem.style[fx.prop]=fx.now+fx.unit;}};jQuery.fn.offset=function(){var left=0,top=0,elem=this[0],results;if(elem)with(jQuery.browser){var parent=elem.parentNode,offsetChild=elem,offsetParent=elem.offsetParent,doc=elem.ownerDocument,safari2=safari&&parseInt(version)<522&&!/adobeair/i.test(userAgent),fixed=jQuery.css(elem,"position")=="fixed";if(elem.getBoundingClientRect){var box=elem.getBoundingClientRect();add(box.left+Math.max(doc.documentElement.scrollLeft,doc.body.scrollLeft),box.top+Math.max(doc.documentElement.scrollTop,doc.body.scrollTop));add(-doc.documentElement.clientLeft,-doc.documentElement.clientTop);}else{add(elem.offsetLeft,elem.offsetTop);while(offsetParent){add(offsetParent.offsetLeft,offsetParent.offsetTop);if(mozilla&&!/^t(able|d|h)$/i.test(offsetParent.tagName)||safari&&!safari2)border(offsetParent);if(!fixed&&jQuery.css(offsetParent,"position")=="fixed")fixed=true;offsetChild=/^body$/i.test(offsetParent.tagName)?offsetChild:offsetParent;offsetParent=offsetParent.offsetParent;}while(parent&&parent.tagName&&!/^body|html$/i.test(parent.tagName)){if(!/^inline|table.*$/i.test(jQuery.css(parent,"display")))add(-parent.scrollLeft,-parent.scrollTop);if(mozilla&&jQuery.css(parent,"overflow")!="visible")border(parent);parent=parent.parentNode;}if((safari2&&(fixed||jQuery.css(offsetChild,"position")=="absolute"))||(mozilla&&jQuery.css(offsetChild,"position")!="absolute"))add(-doc.body.offsetLeft,-doc.body.offsetTop);if(fixed)add(Math.max(doc.documentElement.scrollLeft,doc.body.scrollLeft),Math.max(doc.documentElement.scrollTop,doc.body.scrollTop));}results={top:top,left:left};}function border(elem){add(jQuery.curCSS(elem,"borderLeftWidth",true),jQuery.curCSS(elem,"borderTopWidth",true));}function add(l,t){left+=parseInt(l)||0;top+=parseInt(t)||0;}return results;};})();
Index: branches/prod/youtomb/web/main.conf
===================================================================
--- branches/prod/youtomb/web/main.conf	(revision 140)
+++ branches/prod/youtomb/web/main.conf	(revision 271)
@@ -5,6 +5,7 @@
 log.access_file = "/mit/freeculture/run/youtomb/log/access_log"
 log.error_file = "/mit/freeculture/run/youtomb/log/error_log"
-tools.proxy.on = True
-tools.proxy.base = "http://youtomb.mit.edu/"
+tools.mako.module_directory: "/tmp/youtomb_templates"
+tools.caching.delay = 60
+tools.caching.on = True
 
 # /static requires __file__ for its config, done in code
Index: branches/prod/youtomb/web/vanilla-html/style.css
===================================================================
--- branches/prod/youtomb/web/vanilla-html/style.css	(revision 144)
+++ branches/prod/youtomb/web/vanilla-html/style.css	(revision 144)
@@ -0,0 +1,289 @@
+html {
+	width: 100%;
+	height: 100%;
+}
+
+body {
+	background: #514024 url('./images/background.gif') repeat-x;
+	margin: 0;
+	padding: 0;
+	height: 100%;
+	font-family:Verdana,Geneva,sans-serif;
+}
+
+img {
+	border: 0;
+	padding: 0;
+}
+
+p {
+	border: 0;
+	padding: 0;
+}
+
+.down {
+	color: #a81111;
+}
+
+#header {
+	height: 75px;
+	width: 850px;
+	margin: 0 auto;
+}
+
+#logo {
+	position: relative;
+	margin-left: 20px;
+	top: 17px;
+}
+
+#grass {
+	position: absolute;
+	top: 65px;
+	height:10px;
+	z-index: 99;
+	width: 100%;
+	background: transparent url('./images/grass.gif') repeat-x bottom;
+}
+
+#nav {
+	height: 40px;
+	width: 850px;
+	background: #233139 url('./images/navtop.gif') no-repeat top;
+	margin: 0 auto;
+}
+
+#nav ul {
+	padding: 6px 0 0 15px;
+	margin: 0;
+	color: #c3c7c9;
+}
+
+#nav li {
+	float: left;
+	list-style-type: none;
+	margin-right: 15px;
+}
+
+#nav a {
+	color: #c3c7c9;
+	text-decoration: none;
+	font-weight: bold;
+	font-size: 125%;
+	padding-right: 15px;
+}	
+
+#container {
+	width: 850px;
+	margin: 0 auto;	
+	height: 100%;
+	min-height: 770px;
+}
+
+#maincontent {
+	float: left;
+	border-left: solid 4px #233139;
+	border-right: solid 4px #233139;
+	height:100%;
+	width: 542px;
+	background: #f2f2f2 url('./images/lcbackground.jpg') no-repeat top;
+}
+
+#maincontent h2 {
+	text-align: center;
+	color: #233139;
+	font-size: 135%;
+	margin: 15px 0 10px 0;
+}
+
+#removed {
+	margin: 0 auto;
+	padding: 6px 0 0 0;
+	width: 520px;
+	list-style-type: none;
+	color: #233139;
+	}
+
+#removed li {
+	margin: 0;
+	padding: 0 0 20px 0;
+	height: 94px;
+	background: transparent url('./images/removed-background.png') no-repeat 139px 2px;
+}
+
+#removed img {
+	float: left;
+	margin: 0;
+	padding: 0;
+}
+
+#removed h3 {
+	float: left;
+	margin: 5px 0 2px 25px;
+	padding: 0;
+	width: 370px;
+	height: 20px;
+	overflow: hidden;
+	text-align: left;
+	font-weight: bold;
+	font-size: 100%;
+}
+
+#removed p {
+	float: left;
+	font-size: 70%;
+	padding: 0;
+	margin: 1px 0 2px 25px;
+	width: 365px;
+	height: 18px;
+	overflow: hidden;
+	color: #233139;
+}
+
+#removed strong {
+	font-size: 125%;
+}
+
+#removed .medium {
+	font-size: 110%;
+	font-weight: bold;
+}
+
+#removed .datapoints {
+	margin: 8px 0 0 25px;
+	text-align: center;
+	color: #696b6c; 
+}
+
+#removed .datapoint {
+	color: #233139;
+}
+
+.clear {
+	clear: both;
+}
+
+#sidebar {
+	float: left;
+	background-color: #b3b6b8;
+	width: 300px;
+	height: 100%;
+}
+
+.sidebarbox {
+	width: 285px;
+	margin-left: 7px;
+	margin-top: 10px;
+	height: 47px;
+	background: #e0e1e3 url('./images/sidebar-boxtop.png') no-repeat top;
+}
+
+.sidebarbox .step {
+	float: left;
+	color: #e0e1e3;
+	font-size: 35px;
+	font-weight: bold;
+	margin: 0;
+	padding: 1px 0 0 13px;
+}
+
+.sidebarbox .boxheader {
+	float: left;
+	width: 220px;
+	text-align: left;
+	font-size: 19px;
+	font-weight: bold;
+	color: #233139;
+	margin: 12px 7px 0 20px;
+}
+
+.sidebarboxmiddle {
+	width: 285px;
+	background: #e0e1e3 url('./images/sidebar-boxmiddle.png') repeat-y;
+	margin-left: 7px;
+}
+
+.sidebarboxmiddle p {
+	padding: 4px 0 6px 0; 
+	margin: 0 25px;
+	font-size: 75%;
+	text-align: left;
+	line-height: 1.5em;
+	color: #233139;
+}
+
+h5 {
+	margin: 0;
+	padding: 0px 0 8px 0;
+	font-weight: normal;
+	font-size: 75%;
+	text-align: center;
+}
+
+a {
+	color: #797979;
+}
+
+.sidebarboxmiddle img {
+	padding: 6px 0;
+	margin: 0 auto;
+}
+
+.sidebarboxbottom {
+	width: 285px;
+	margin-left: 7px;
+	height: 13px;
+	background: #e0e1e3 url('./images/sidebar-boxbottom.png') no-repeat bottom;
+}
+
+#scanner {
+	margin: 0 auto;
+	padding: 6px 0 4px;
+	width: 271px;
+	list-style-type: none;
+	color: #233139;
+	}
+
+#scanner li {
+	margin: 0;
+	padding: 0;
+	height: 43px;
+}
+
+#scanner img {
+	float: left;
+	margin: 0;
+	padding: 7px 0 4px 8px;
+}
+
+#scanner h5 {
+	float: left;
+	margin: 5px 0 2px 10px;
+	padding: 0;
+	width: 214px;
+	height: 15px;
+	overflow: hidden;
+	text-align: left;
+	font-weight: bold;
+	font-size: 65%;
+}
+
+#scanner p {
+	float: left;
+	font-size: 50%;
+	padding: 0;
+	margin: 0 0 0 10px;
+	width: 214px;
+	overflow: hidden;
+	color: #696b6c; 
+}
+
+#scanner .dark {
+	background-color: #b3b6b8;
+}
+
+#footer {
+	height: 65px;
+	color: #233139;
+	background-color: #233139;
+}
Index: branches/prod/youtomb/web/vanilla-html/index.html
===================================================================
--- branches/prod/youtomb/web/vanilla-html/index.html	(revision 144)
+++ branches/prod/youtomb/web/vanilla-html/index.html	(revision 144)
@@ -0,0 +1,144 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+       "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+<title>YouTomb</title>
+<link rel="stylesheet" href="style.css" type="text/css" media="screen"  />
+</head>
+<body>
+
+<div id="header">
+	<a href="#"><img id="logo" src="./images/tomb-logo.png" alt="YouTomb" /></a>
+</div> <!--/header-->
+
+<div id="grass"></div>
+
+<div id="nav">
+	<ul>
+		<li><a href="#">Browse</a>|</li>
+		<li><a href="#">Stats</a>|</li>
+		<li><a href="#">Suggest Video</a>|</li>
+		<li><a href="#">About</a></li>
+	</ul>
+</div> <!--/nav-->
+
+<div id="container">
+	<div id="maincontent">
+		<h2>Videos Removed for Copyright Complaint</h2>
+			<ul id="removed">
+		 		<li>
+					<img src="thumbnails/large.jpg" alt="video thumbnail" />
+					<h3>Happy Tree Friends Don't Like to Sleep</h3>
+					<p>Asked to be removed by <strong class="down">Twentieth Century Fox</strong></p>
+					<p><em>16 hrs ago</em>, after it had been viewable for <span class="medium">1 day</span>.</p>
+					<p class="datapoints">
+					<span class="datapoint">Category:</span> Entertainment &nbsp;&nbsp;
+					<span class="datapoint">Views:</span> 62,212,212</p>
+		 		</li>
+		 		<div class="clear"></div>
+		 		<li>
+					<img src="thumbnails/large.jpg" alt="video thumbnail" />
+					<h3>Happy Tree Friends Don't Like to Sleep</h3>
+					<p>Asked to be removed by <strong class="down">Twentieth Century Fox</strong></p>
+					<p><em>16 hrs ago</em>, after it had been viewable for <span class="medium">1 day</span>.</p>
+					<p class="datapoints">
+					<span class="datapoint">Category:</span> Entertainment &nbsp;&nbsp;
+					<span class="datapoint">Views:</span> 62,212,212</p>
+		 		</li>
+		 		<div class="clear"></div>
+		 		<li>
+					<img src="thumbnails/large.jpg" alt="video thumbnail" />
+					<h3>Happy Tree Friends Don't Like to Sleep</h3>
+					<p>Asked to be removed by <strong class="down">Twentieth Century Fox</strong></p>
+					<p><em>16 hrs ago</em>, after it had been viewable for <span class="medium">1 day</span>.</p>
+					<p class="datapoints">
+					<span class="datapoint">Category:</span> Entertainment &nbsp;&nbsp;
+					<span class="datapoint">Views:</span> 62,212,212</p>
+		 		</li>
+		 		<div class="clear"></div>
+			</ul> <!--/removed-->
+			<h5><a href="#">view all takedowns</a></h5>
+			
+	
+	</div> <!--/maincontent-->
+	<div id="sidebar">
+		<div class="sidebarbox">
+			<div class="step">1</div><div class="boxheader">What is YouTomb?</div>
+		</div> <!--/sidebarbox-->
+		<div class="sidebarboxmiddle">
+			<p>YouTube relys on automated scanning software. A machine flags videos which incorporate media that may be protected by copyright.</p> 
+			
+			<p>The extent and precision of their system is unkown; YouTomb brings these copyright allegations to light.</p>
+			<h5><a href="#">more info</a></h5>
+		</div> <!--/sidebarboxmiddle-->
+		<div class="sidebarboxbottom"></div>
+		
+		<div class="sidebarbox">
+			<div class="step">2</div><div class="boxheader">Scan Video Data</div>
+		</div> <!--/sidebarbox-->
+		<div class="sidebarboxmiddle">
+			<ul id="scanner">
+		 		<li class="dark">
+					<img src="thumbnails/small.jpg" alt="tiny video thumbnail" />
+					<h5>Happy Tree Friends Don't Like to Sleep</h5>
+					<p>
+						<strong>Cat:</strong> Comedy &nbsp;&nbsp;
+						<strong>Status:</strong> Up &nbsp;&nbsp;
+						<strong>Views:</strong> 23,029,012
+					</p>
+		 		</li>
+		 		<li>
+					<img src="thumbnails/small.jpg" alt="tiny video thumbnail" />
+					<h5>Happy Tree Friends Don't Like to Sleep</h5>
+					<p>
+						<strong>Cat:</strong> Comedy &nbsp;&nbsp;
+						<strong>Status:</strong> Up &nbsp;&nbsp;
+						<strong>Views:</strong> 23,029,012
+					</p>
+		 		</li>
+		 		<li class="dark">
+					<img src="thumbnails/small.jpg" alt="tiny video thumbnail" />
+					<h5>Happy Tree Friends Don't Like to Sleep</h5>
+					<p>
+						<strong>Cat:</strong> Comedy &nbsp;&nbsp;
+						<strong>Status:</strong> Up &nbsp;&nbsp;
+						<strong>Views:</strong> 23,029,012
+					</p>
+		 		</li>
+		 		<li>
+					<img src="thumbnails/small.jpg" alt="tiny video thumbnail" />
+					<h5>Happy Tree Friends Don't Like to Sleep</h5>
+					<p>
+						<strong>Cat:</strong> Comedy &nbsp;&nbsp;
+						<strong>Status:</strong> Up &nbsp;&nbsp;
+						<strong>Views:</strong> 23,029,012
+					</p>
+		 		</li>
+		 		<li class="dark">
+					<img src="thumbnails/small.jpg" alt="tiny video thumbnail" />
+					<h5>Happy Tree Friends Don't Like to Sleep</h5>
+					<p>
+						<strong>Cat:</strong> Comedy &nbsp;&nbsp;
+						<strong>Status:</strong> Up &nbsp;&nbsp;
+						<strong>Views:</strong> 23,029,012
+					</p>
+		 		</li>
+			</ul> <!--/scanner-->
+		</div> <!--/sidebarboxmiddle-->
+		<div class="sidebarboxbottom"></div>
+		
+		<div class="sidebarbox">
+			<div class="step">3</div><div class="boxheader">Track Complaints</div>
+		</div> <!--/sidebarbox-->
+		<div class="sidebarboxmiddle">
+			<p>YouTomb constantly scans a growing database of YouTube videos for alleged copyright violations. Videos that are taken down are listed here.</p>
+		<p><img src="images/arrows.png" alt="arrows" /></p>
+		</div> <!--/sidebarboxmiddle-->
+		<div class="sidebarboxbottom"></div>				
+	</div> <!--/sidebar-->
+	<div class="clear"></div>
+	<div id="footer"><div>
+</div> <!--/container-->
+
+</body>
+</html>
Index: branches/prod/youtomb/web/templates/about.mako
===================================================================
--- branches/prod/youtomb/web/templates/about.mako	(revision 271)
+++ branches/prod/youtomb/web/templates/about.mako	(revision 271)
@@ -0,0 +1,66 @@
+<%inherit file="layout.mako" />
+<%def name="title()">
+${parent.title()} - Data Feeds
+</%def>
+<div id="about">
+
+<ul>
+<li><a href="about#what">What is YouTomb?</a></li>
+<li><a href="about#who">Who is behind the YouTomb?</a></li>
+<li><a href="about#why">Why did you make YouTomb?</a></li>
+<li><a href="about#violation">Are you encouraging copyright violation?</a></li>
+<li><a href="about#watch">Can I watch these videos?</a></li>
+<li><a href="about#fairuse">What is fair use?</a></li>
+<li><a href="about#takendown">My video got taken down, what do I do?</a></li>
+<li><a href="about#whytakedown">Why is stuff taken down in the first place?</a></li>
+<li><a href="about#howtakedown">How does YouTube determine what to take down?</a></li>
+<li><a href="about#feeds">Can I use your data?</a></li>
+<li><a href="about#help">How can I help?</a></li>
+<li><a href="about#contributors">Who are the contributors?</a></li>
+</ul>
+
+<h2><a name="what">What is YouTomb?</a></h2>
+<p>YouTomb is a research project by MIT Free Culture that tracks videos taken down from YouTube for alleged copyright violation.</p>
+
+<p>More specifically, YouTomb continually monitors the most popular videos on YouTube for copyright-related takedowns. Any information available in the metadata is retained, including who issued the complaint and how long the video was up before takedown. The goal of the project is to identify how YouTube recognizes potential copyright violations as well as to aggregate mistakes made by the algorithm.</p>
+
+<h2><a name="who">Who is behind YouTomb?</a></h2>
+<p>YouTomb was built by <a href="http://freeculture.mit.edu/">MIT Free Culture</a>, a student organization at MIT. Active <a href="http://www.freeculture.org/">Free Culture</a> chapters exist at many schools and universities; they work together to promote open access to knowledge and culture. Here is a list of <a href="contributors">contributors</a>.</p>
+
+<h2><a name="why">Why did you make YouTomb?</a></h2>
+<p>When a user-submitted video is suspected to infringe copyright, the rights holder is contacted and given the option to take down the video in question. In addition, rights holders can submit DMCA takedown notifications at any time that cause YouTube to immediately remove alleged infringing content.</p>
+
+<p>MIT Free Culture became especially interested in the issue after YouTube announced that it would begin using filtering technology to scan users' video and audio for near-matches with copyrighted material. While automating the takedown process may make enforcement easier, it also means that content falling under <a href="http://en.wikipedia.org/wiki/Fair_use">fair-use exceptions</a> and even totally innocuous videos may receive some of the collateral damage.</p>
+
+<p>As YouTube is not very transparent with the details surrounding this process and the software used, YouTomb was conceived to shed light on YouTube's practices, to educate the general public on the relevant copyright issues, and to provide helpful resources to users who have had their videos wrongfully taken down.</p>
+
+<h2><a name="violation">Are you encouraging copyright violation?</a></h2>
+<p>We are watchdogs; this project does not condone or promote illegal activity. That being said, many members of Free Culture take issue with the current state of US copyright and are actively seeking to reform it.</p>
+
+<p>While many YouTube videos that contain non-original material are blatantly violating copyright (e.g. exact rips of TV shows), many others have a more complex legal status because of the <a href="http://en.wikipedia.org/wiki/Fair_use">fair use provision</a> of copyright law. The sampling and remixing of non-original material have often led to great cultural accomplishments, so protecting this fragile aspect of copyright law is very important to us.</p>
+
+<h2><a name="watch">Can I watch these videos?</a></h2>
+<p>These videos are not available for viewing/downloading. Once again, this is simply a research project that seeks to find out more details about how YouTube locates and takes down videos accused of copyright violation.</p>
+
+<h2><a name="fairuse">What is fair use?</a></h2>
+<p>Fair use is the section of US copyright that allows creators to legally incorporate copyrighted work into their own works without permission of the copyright owner in certain situations. It is generally invoked for purposes of criticism, satire, parody, and education. Because fair use is so complex, we won't attempt to cover all the intricacies here &mdash; we suggest you read this <a href="http://en.wikipedia.org/wiki/Fair_use">article</a>.</p>
+
+<h2><a name="takendown">My video got taken down, what do I do?</a></h2>
+<p>If you believe your video was wrongfully taken down (it falls under fair use, or it contains no copyrighted material), you can <a href="http://fairusenetwork.org/reference/td.php"> file a DMCA counter-claim</a> to have your video restored.</p>
+
+<h2><a name="whytakedown">Why is stuff taken down in the first place?</a></h2>
+<p>Many rights holders believe that videos uploaded to YouTube damage their business or income stream. As such, rights holders can submit their works to a database of copyrighted work to be fingerprinted. Whenever YouTube's automated system finds a matching fingerprint (or part of the fingerprint), it notifies the rights holder. At that point, the rights holder can optionally take down the video.</p>
+
+<h2><a name="howtakedown">How does YouTube determine what to take down?</a></h2>
+<p>As far as we know, YouTube generally doesn't take videos down themselves, but uses a scanning system that automatically notifies rights holders when suspected infringements occur. The rights holders are then able to remove the flagged items.</p>
+
+<h2><a name="feeds">Can I use your data?</a></h2>
+YouTomb is licensed as <a href="http://www.fsf.org/licensing/licenses/agpl-3.0.html">AGPL 3</a>. <a href="https://youtomb.mit.edu:8662/">Source code available here</a>. Additionally, we have <a href="feeds/">feeds</a>. If you have other suggestions for how to best structure the data, please send them our way.</p>
+
+<h2><a name="help">How can I help?</a></h2>
+<p>You can <a href="contact">contact us</a> if you're interested in helping, or if you're local, come to the next <a href="http://freeculture.mit.edu/">MIT Free Culture meeting</a>.</p>
+
+<h2><a name="contributors">Who are the contributors?</a></h2>
+<p>YouTomb was initially built by: Greg Price, David Sheets, Quentin Smith &amp; Dean Jansen.</p>
+<p>Additional contributors include: Oliver Day, Paul Irish, Peter Olson, Elizabeth Stark, Ben Weeks &amp; Christina Xu.</p>
+</div>
Index: branches/prod/youtomb/web/templates/base.mako
===================================================================
--- branches/prod/youtomb/web/templates/base.mako	(revision 128)
+++ branches/prod/youtomb/web/templates/base.mako	(revision 271)
@@ -5,6 +5,5 @@
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
 <head>
-## TODO(quentin): make this depend on the request, to be base-portable
-<base href="/" />
+<base href="${cherrypy.request.base}" />
 <title>${self.title()}</title>
 ${self.head()}
Index: branches/prod/youtomb/web/templates/statistics.mako
===================================================================
--- branches/prod/youtomb/web/templates/statistics.mako	(revision 69)
+++ branches/prod/youtomb/web/templates/statistics.mako	(revision 271)
@@ -3,4 +3,12 @@
 ${parent.title()} - Statistics
 </%def>
+
+<%def name="head()">
+${parent.head()}
+<script src="static/jquery-1.2.3.min.js" type="text/javascript"></script>
+<script src="static/script.js" type="text/javascript"></script>
+</%def>
+
+
 <p>YouTomb is currently monitoring ${sum(count.values())} videos, and has identified ${count['copyright']} videos taken down for alleged copyright violation and ${count['inactive']} videos taken down for other reasons. The index is currently ${staleness} seconds out of date.</p>
 <h2>Video Status</h2>
Index: branches/prod/youtomb/web/templates/layout.mako
===================================================================
--- branches/prod/youtomb/web/templates/layout.mako	(revision 117)
+++ branches/prod/youtomb/web/templates/layout.mako	(revision 271)
@@ -1,40 +1,76 @@
+
 <%inherit file="base.mako"/>
 
-<h1>${self.title()}</h1>
-
-<ul id="menu">
-<li class="first">About YouTomb</li>
-<li><a href='.'>Dashboard</a></li>
-<li><a href='statistics'>Statistics</a></li>
-<li><a href='nominate'>URL Nomination</a></li>
-<li><a href='search'>Search</a></li>
-<li><a href='feeds/'>Feeds</a></li>
-<li><a href='trac'>Trac</a></li>
-<li><a href='contact'>Contact Us</a></li>
-</ul>
-
-${next.body()}
-
-<p>YouTomb is a research project of <a href='http://freeculture.mit.edu'>MIT Free Culture</a>. The purpose of the project is to investigate what kind of videos are subject to takedown notices due to allegations of copyright infringement with particular emphasis on those for which the takedown may be mistaken.  Although our initial focus is on videos hosted by YouTube, we are interested in other video collections as well.</p>
-<p><a href="http://validator.w3.org/check/referer">Valid XHTML 1.0 Strict</a></p>
 <%def name="head()">
 ${parent.head()}
-<style type="text/css">
-body { font-family: sans-serif; }
+<link rel="stylesheet" href="static/style.css" type="text/css" media="screen" />
+<link rel="shortcut icon" href="static/favicon.ico" />
+<script src="static/jquery-1.2.3.min.js" type="text/javascript"></script>
+<script src="static/script.js" type="text/javascript"></script>
 
-#menu { display: block; text-align: center; margin: 0px auto; }
-#menu li {
-  display: inline;
-  padding-left: 7px;
-  padding-right: 3px;
-  border-left: 1px dashed #066;
-  }
+</%def>
 
-#menu li.first {
-  display: inline;
-  padding-left: 3px;
-  padding-right: 3px;
-  border-left: 0px;
-  }
-</style>
+<div id="header">
+	<a href="."><img id="logo" src="static/images/tomb-logo.png" alt="YouTomb" /></a><img id="daisies" src="static/images/daisies.gif" alt="daisies" />
+</div> <!--/header-->
+
+<div id="grass"></div>
+
+<div id="nav">
+    <ul>
+		<li><a href="">Home</a></li>
+		<li><a href="browse">Browse</a></li>
+		<li><a href="statistics">Stats</a></li>
+		<li><a href="feeds/">Feeds</a></li>
+		<li class="last"><a href="about">About</a></li>
+	</ul>
+% if False:
+## For when we're ready
+	<div id="searchForm">
+	  <input type="text" id="searchInput" value="video search"/>
+	  <input type="submit" id="searchSubmit" value="GO"/>
+	</div>
+% endif
+</div> <!--/nav-->
+
+<div id="container">
+<%
+sidebar = capture(self.sidebar).strip()
+%>
+% if sidebar:
+	<div id="sidebar">
+        ${sidebar}
+	</div> <!--/sidebar-->
+% endif
+    <div id="maincontent">
+        ${next.body()}
+       	<div class="clear"></div>
+    </div> <!--/maincontent-->
+	<div id="footer"><p>YouTomb is a research project of <a href='http://freeculture.mit.edu'>MIT Free Culture</a>. The purpose of the project is to investigate what kind of videos are subject to takedown notices due to allegations of copyright infringement with particular emphasis on those for which the takedown may be mistaken.  Although our initial focus is on videos hosted by YouTube, we are interested in other video collections as well.</p>
+
+<p>
+YouTomb is licensed as <a href="http://www.fsf.org/licensing/licenses/agpl-3.0.html">AGPL 3</a>. <a href="https://youtomb.mit.edu:8662/">Source code available here</a>. <a href="contact">Contact us</a>.
+</p>
+</div>
+</div> <!--/container-->
+
+<%def name="sidebar()">
 </%def>
+
+<%def name="sidebarbox(title, step=None)">
+        % if step:
+        <div class="sidebarbox">
+			<div class="step">${step}</div><div class="boxheader">${title}</div>
+		</div> <!--/sidebarbox-->
+        % else:
+        <div class="sidebarbox flattop">
+        % if title:
+            <div class="boxheader">${title}</div>
+        % endif
+        </div>
+        % endif
+		<div class="sidebarboxmiddle">
+			${caller.body()}
+		</div> <!--/sidebarboxmiddle-->
+		<div class="sidebarboxbottom"></div>
+</%def>
Index: branches/prod/youtomb/web/templates/browse.mako
===================================================================
--- branches/prod/youtomb/web/templates/browse.mako	(revision 271)
+++ branches/prod/youtomb/web/templates/browse.mako	(revision 271)
@@ -0,0 +1,69 @@
+<%inherit file="layout.mako" />
+<%namespace name="video" file="parts/video.mako"/>
+<%def name="title()">
+${parent.title()} - Browse
+</%def>
+
+<%!
+    import urllib
+    def u2(string):
+        return urllib.quote(string.encode('utf-8'), '')
+%>
+
+<%def name="self_url(**kwargs)">
+<%
+q = context['query'].copy()
+q.update(kwargs)
+%>
+browse/${q['status']|u2}/${q['sort']|u2}/${q['direction']|u2}/${q['page']|u2}/${q['count']|u2}
+</%def>
+
+<%def name="sortkey(name, label)">
+    % if query['sort'] == name:
+        <span class="sortkey">
+        % if query['direction'] == "down":
+            <a class="sortdir" href="${self_url(direction="up")}">
+            ${label} <img src="static/images/down.png" /></a>
+        % else:
+            <a class="sortdir" href="${self_url(direction="down")}">
+            ${label} <img src="static/images/up.png" /></a>
+        % endif
+        </span>
+    % else:
+        <a href="${self_url(sort=name, page=1)}">${label}</a>
+    % endif
+</%def>
+    
+<div id="browseheader">
+<span class="resultnum"><strong>Displaying:</strong> ${count} results on page ${query['page']|h}</span>
+<span class="sorter"><strong>sort by:</strong> ${sortkey("freshness", "freshness")} | ${sortkey("views", "views")} | ${sortkey("rating", "rating")}</span>
+</div>
+
+% if count > 0:
+<ul class="videolist-big" id="search-results">
+% for scan in videos:
+${video.listitem_big(scan)}
+% endfor
+<div id="pagelinks"><strong>Page ${query['page']|h}:</strong>
+<a href="${self_url(page=int(query['page'])-1)}">Previous</a> |
+<a href="${self_url(page=int(query['page'])+1)}">Next</a>
+</div>
+</ul>
+% else:
+<p>YouTomb was unable to find any videos matching your criteria.</p>
+% endif
+
+<%def name="sidebar()" cached="True" cache_timeout="30">
+${parent.sidebar()}
+<%call expr="self.sidebarbox('Filter Your Results', 0)">
+<ul id="filters">
+<li>Specific Claimant
+<ul>
+% for claimant in claimants[0:10]:
+<li><a href="browse/down:copyright:${claimant['name']|u2}">${claimant['name']|h}</a></li>
+% endfor
+</ul>
+</li>
+</ul>
+</%call>
+</%def>
Index: branches/prod/youtomb/web/templates/results.mako
===================================================================
--- branches/prod/youtomb/web/templates/results.mako	(revision 106)
+++ branches/prod/youtomb/web/templates/results.mako	(revision 271)
@@ -1,27 +1,14 @@
 <%inherit file="layout.mako" />
+<%namespace name="video" file="parts/video.mako"/>
+
 <%def name="title()">
 ${parent.title()} - Search Results
 </%def>
 % if count > 0:
-<table>
-<tr>
-<th>Title</th>
-<th>Scan Time</th>
-<th>Category</th>
-<th>Status</th>
-<th>Number of Views</th>
-<th>Average Rating</th>
-</tr>
+<ul class="videolist-big" id="search-results">
 % for scan in videos:
-<tr>
-<td><a href="youtube/${scan['external_id']}">${scan['title']}</a></td>
-<td>${scan['timestamp']}</td>
-<td>${scan['category']}</td>
-<td>${scan['status']}</td>
-<td>${scan['num_views']}</td>
-<td>${scan['avg_rating']}</td>
-</tr>
+${video.listitem_big(scan)}
 % endfor
-</table>
+</ul>
 % else:
 <p>YouTomb was unable to find any videos matching your criteria.</p>
Index: branches/prod/youtomb/web/templates/parts/latest_scans.mako
===================================================================
--- branches/prod/youtomb/web/templates/parts/latest_scans.mako	(revision 106)
+++ branches/prod/youtomb/web/templates/parts/latest_scans.mako	(revision 271)
@@ -1,20 +1,8 @@
 <%page expression_filter="h"/>
-<h2>Latest Scans</h2>
-<table>
-<tr>
-<th>Title</th>
-<th>Scan Time</th>
-<th>Category</th>
-<th>Status</th>
-<th>Number of Views</th>
-</tr>
-% for scan in scans:
-<tr>
-<td><a href="youtube/${scan['external_id']}">${scan['title']}</a></td>
-<td>${scan['timestamp']}</td>
-<td>${scan['category']}</td>
-<td>${scan['status']}</td>
-<td>${scan['num_views']}</td>
-</tr>
+<%namespace name="video" file="video.mako"/>
+
+
+% for i, scan in enumerate(scans):
+${video.listitem_sidebar(scan, (i%2 == 0))}
 % endfor
-</table>
+
Index: branches/prod/youtomb/web/templates/parts/video.mako
===================================================================
--- branches/prod/youtomb/web/templates/parts/video.mako	(revision 271)
+++ branches/prod/youtomb/web/templates/parts/video.mako	(revision 271)
@@ -0,0 +1,82 @@
+<%!
+from youtomb.db import Database as db
+from datetime import datetime
+import urllib
+
+def format_timedelta(td, d2=None):
+    if td is None:
+        return "unknown"
+    elif isinstance(td, datetime):
+        if d2 is None:
+            return "unknown"
+        else:
+            td = td-d2
+    seconds = td.seconds+(td.days*3600*24)
+    if seconds < 3600:
+        return "%d minute%s" % (int(seconds/60), "s" if seconds>=120 else "")
+    elif seconds < 3600*24:
+        return "%d hour%s" % (int(seconds/3600), "s" if seconds>=7200 else "")
+    else:
+        return "%d day%s" % (td.days, "s" if td.days>=2 else "")
+def u2(string):
+    return urllib.quote(string.encode('utf-8'), '')
+%>
+<%def name="listitem_big(scan)">
+    <%
+        status = scan['status'].split(':')
+        thumbnail = "static/images/thumb-generic-large.png"
+        try:
+            thumbnail = db().onerow("SELECT data_filename FROM media WHERE artifact_id = %s AND rel='thumbnail' LIMIT 1", (scan['artifact_id'],))['data_filename']
+        except:
+            thumbnail = "static/images/thumb-generic-large.png"
+    %>
+     <li>
+        <img src="${thumbnail}" alt="video thumbnail" />
+        <div class="videoinfo">
+            <h3><a href="youtube/${scan['external_id'] | h}">${scan['title'] | h}</a></h3>
+            % if status[0] == 'down':
+                % if status[1] == 'copyright':
+                    <p>Asked to be removed by <a href="browse/${scan['status']|u2}" class="down">${status[2] | h}</a></p>
+                % elif status[1] == 'tos':
+                    <p>Removed by YouTube for <strong class="down">terms of service violation</strong></p>
+                % elif status[1] == 'user':
+                    <p>Removed by <strong class="down">the user</strong></p>
+                % elif status[1] == 'other':
+                    <p>Down for an unknown reason</p>
+                % endif
+                <p><em>${format_timedelta(datetime.now(),scan['timestamp'])} ago</em>, after it had been viewable for <span class="medium">${format_timedelta(scan['timestamp'],scan['time_published'])}</span>.</p>
+            % elif status[0] == 'up':
+                <p>Available for <span class="medium">${format_timedelta(datetime.now(),scan['time_published'])}</span></p>
+            % endif
+        </div>
+        <p class="datapoints">
+        <span class="datapoint">Category:</span> ${scan['category'] | h} &nbsp;&nbsp;
+        <span class="datapoint">Views:</span> ${scan['num_views']}</p>
+     </li>
+</%def>
+
+<%def name="listitem_sidebar(scan, dark=False)">
+    <%
+        status = scan['status'].split(':')
+        status_string = "Unknown"
+        if status[0] == 'up':
+            status_string = "Up"
+        elif status[1] == 'down':
+            status_string = "Down"
+            
+        thumbnail = "static/images/thumb-generic-large.png"
+        try:
+            thumbnail = db().onerow("SELECT data_filename FROM media WHERE artifact_id = %s AND rel='thumbnail' LIMIT 1", (scan['artifact_id'],))['data_filename']
+        except:
+            thumbnail = "static/images/thumb-generic-large.png"
+    %>
+    <li${' class="dark"' if dark else ''}>
+        <img src="${thumbnail}" width="36" height="28" alt="video thumbnail" />
+        <h5><a href="youtube/${scan['external_id'] | h}">${scan['title'] | h}</a></h5>
+        <p>
+            <strong>Cat:</strong> ${scan['category'] | h}
+            <strong>Status:</strong> ${status_string | h}
+            <strong>Views:</strong> ${scan['num_views']}
+        </p>
+    </li>
+</%def>
Index: branches/prod/youtomb/web/templates/video.mako
===================================================================
--- branches/prod/youtomb/web/templates/video.mako	(revision 116)
+++ branches/prod/youtomb/web/templates/video.mako	(revision 271)
@@ -7,34 +7,44 @@
 
 <%def name="title()">
-${parent.title()} - YouTube Video - ${snapshot['title']}
+${parent.title()} - YouTube Video - ${snapshot['title'] | h}
 </%def>
 
-<h2><a href="http://www.youtube.com/watch?v=${artifact['external_id']}">
-${snapshot['title']}
+<div id="videodisplay">
+<h2><a href="http://www.youtube.com/watch?v=${artifact['external_id'] | h}">
+${snapshot['title'] | h}
 </a></h2>
-<div id='user_msg'>uploaded by user <span id='user'>
-
-% if artifact['user'] is not None:
-<a href="http://www.youtube.com/profile?user=${artifact['user']}">
-% endif
-
-<b>${artifact['user']}</b>
-
-% if artifact['user'] is not None:
-</a>
-% endif
-
-</span></div>
-<div id='time_msg'>published <span id='time_published'><b>${artifact['time_published']}</b></span>
-% if current_snapshot['status'] != 'up':
-missing since <span id='time_missing'><b>${current_snapshot['timestamp']}</b></span>, current status <b>${current_snapshot['status']}</b>
-% endif
-</div>
 
 <div id='thumbnails'>
 % for t in thumbnails:
-<img src="${t["url"]}" alt="Thumbnail from ${t["time"]}" />
+<img src="${t["data_filename"]}" alt="Thumbnail" />
 % endfor
 </div>
-<div id='tags_msg'>Tags: <span id='tags'><b>${snapshot['tags']}</b></span></div>
-<div id='description'>${snapshot['description'] | newline}</div>
+</div>
+
+<%def name="sidebar()">
+${parent.sidebar()}
+<%call expr="self.sidebarbox(None, None)">
+    <p><strong>Published by:</strong>
+    
+    % if artifact['user'] is not None:
+    <a href="http://www.youtube.com/profile?user=${artifact['user'] | u}">
+    % endif
+    
+    <b>${artifact['user'] | h}</b>
+    
+    % if artifact['user'] is not None:
+    </a>
+    % endif
+    
+    <p><strong>Uploaded on:</strong> ${artifact['time_published']}</p>
+    
+    % if current_snapshot['status'] != 'up':
+    <p><strong>Video Status:</strong> ${current_snapshot['status'] | h}</p>
+    <p><strong>Down Since:</strong> <span id='time_missing'>${current_snapshot['timestamp']}</p> 
+    % endif
+    
+    <p><strong>Description:</strong> ${snapshot['description'] | h,newline}</p>
+    
+    <p><strong>Tags:</strong> ${snapshot['tags'] | h}</p>
+</%call>
+</%def>
Index: branches/prod/youtomb/web/templates/front.mako
===================================================================
--- branches/prod/youtomb/web/templates/front.mako	(revision 106)
+++ branches/prod/youtomb/web/templates/front.mako	(revision 271)
@@ -1,35 +1,34 @@
 <%inherit file="layout.mako" />
-<%def name="head()">
-${parent.head()}
-<script src="static/prototype.js" type="text/javascript"></script>
-<script type="text/javascript">
-// <![CDATA[
-function initUpdaters() {
-	new Ajax.PeriodicalUpdater('latest_scans', '/parts/latest_scans', {asynchronous:true, frequency:3});
-}
-document.observe("dom:loaded", initUpdaters);
-// ]]>
-</script>
+<%namespace name="video" file="parts/video.mako"/>
+
+
+
+<h2>Videos Removed for Copyright Complaint</h2>
+
+<ul class="videolist-big" id="removed">
+% for scan in scans:
+${video.listitem_big(scan)}
+% endfor
+</ul> <!--/removed-->
+<h5><a href="browse/down?count=100">browse more takedowns</a></h5>
+<p>YouTomb is currently monitoring ${sum(count.values())} videos, and has identified ${count['copyright']} videos taken down for alleged copyright violation and ${count['inactive']} videos taken down for other reasons.</p>
+
+<%def name="sidebar()">
+${parent.sidebar()}
+<%call expr="self.sidebarbox('What is YouTomb?', 1)">
+    <p>YouTomb is a research project by MIT Free Culture that tracks videos taken down from YouTube for alleged copyright violation.</p>
+    <h5><a href="about">more info</a></h5>
+</%call>
+<%call expr="self.sidebarbox('Latest Video Scans', 2)">
+    <div id="latest_scans" style=" background: url('/static/images/ajax-loader.gif') no-repeat center 40px;">
+      <ul id="scanner">
+        <li></li>
+      </ul>
+    </div>
+    <div id="holdingDiv" style="display:none"></div>
+</%call>
+<%call expr="self.sidebarbox('Track Complaints', 3)">
+    <p>YouTomb constantly scans a growing database of YouTube videos for alleged copyright violations. Videos that are taken down are listed here.</p>
+    <p><img src="static/images/arrows.png" alt="arrows" /></p>
+</%call>
 </%def>
-<div id="latest_scans">
-</div>
-<h2>Recent Takedowns</h2>
-<table>
-<tr>
-<th>Title</th>
-<th>Scan Time</th>
-<th>Category</th>
-<th>Status</th>
-<th>Number of Views</th>
-</tr>
-% for scan in scans:
-<tr>
-<td><a href="youtube/${scan['external_id']}">${scan['title']}</a></td>
-<td>${scan['timestamp']}</td>
-<td>${scan['category']}</td>
-<td>${scan['status']}</td>
-<td>${scan['num_views']}</td>
-</tr>
-% endfor
-</table>
-<p>YouTomb is currently monitoring ${sum(count.values())} videos, and has identified ${count['copyright']} videos taken down for alleged copyright violation and ${count['inactive']} videos taken down for other reasons.</p>
