diff --git a/notes/templates/notes/base.html b/notes/templates/notes/base.html
index 4f4cae4..341f3f6 100644
--- a/notes/templates/notes/base.html
+++ b/notes/templates/notes/base.html
@@ -3,11 +3,15 @@
 {% load i18n %}
 
 {% block sidebar %}
-<form method="GET" name="searchForm" action="{% url note_search request.user.username %}">
+
+{% block sidebar_search_form %}
+<form method="GET" name="searchForm" action="{% url note_detail_with_query username=note.author.username, note_id=note.id, slug=note.slug %}">
     <input type="text" id="search" class="dim" name="query" accesskey="s" value="{% trans "Search your notes" %}">
 </form>
 {% endblock %}
 
+{% endblock %}
+
 {% block extra_body %}
 <script type="text/javascript">
 $(document).ready(function() {
@@ -16,8 +20,11 @@ $(document).ready(function() {
                     .val("")
                     .unbind("focus", undim);
     }
-    $("#search").bind("focus", undim);
-
+    
+    if($("#search").attr('class') == "dim") {
+        $("#search").bind("focus", undim);
+    }
+    
     $('#search').keyup(function(e) {
         // enter key
         if (e.keyCode == 13) {
diff --git a/notes/templates/notes/note_detail.html b/notes/templates/notes/note_detail.html
index 9f952ab..8baf9b7 100644
--- a/notes/templates/notes/note_detail.html
+++ b/notes/templates/notes/note_detail.html
@@ -16,6 +16,7 @@
 
 {% block sidebar %}
 {{ block.super }}
+{% block sidebar_notes_list %}
 {% user_notes_list request author as all_notes %}
 <div id="sidebar-note-list">
     <ul>
@@ -24,7 +25,10 @@
 {% endfor %}
         <li class="more-item"><a href="{% url note_list author.username %}">{% trans "More Notes..." %}</a></li>
     </ul>
+</div>
+{% endblock %}
     <hr />
+<div id="sidebar-new-note">
     <ul>
 {# Enable when we allow editing #}
 {% comment %}
diff --git a/notes/templates/notes/note_detail_with_query.html b/notes/templates/notes/note_detail_with_query.html
new file mode 100644
index 0000000..74f7b16
--- /dev/null
+++ b/notes/templates/notes/note_detail_with_query.html
@@ -0,0 +1,27 @@
+{% extends 'notes/note_detail.html' %}
+
+{% load i18n %}
+{% load notes %}
+
+{% block title %}Search "{{query|safe}}" | {{ block.super }}{% endblock %}
+
+{% block sidebar_search_form %}
+<form method="GET" name="searchForm" action="">
+    <input type="text" id="search" name="query" accesskey="s" value="{{query}}">
+</form>
+{% endblock %}
+
+
+{% block sidebar_notes_list %}
+{% user_notes_list_with_query request author query as list_notes %}
+<div id="sidebar-note-list">
+    <ul>
+{% for n in list_notes %}
+         <li class="note-item{% if n.pinned %} pinned{% endif %}">
+         <a href="{% url note_detail_with_query username=n.author.username, note_id=n.id, slug=n.slug %}?query={{query}}">{{ n.title|safe }}</a>
+         </li>
+{% endfor %}
+        <a href="{{ note.get_absolute_url }}"><input type="button" value="{% trans "Clear Search" %}" style="width:100%"></a>
+    </ul>
+</div>
+{% endblock %}
diff --git a/notes/templatetags/notes.py b/notes/templatetags/notes.py
index d26db38..33fec31 100644
--- a/notes/templatetags/notes.py
+++ b/notes/templatetags/notes.py
@@ -16,12 +16,14 @@
 #
 
 from django import template
+from django.db.models import Q
 
 from snowy import settings
 from snowy.notes.models import Note, NoteTag
 
 register = template.Library()
 
+
 @register.tag
 def user_notes_list(parser, tokens):
     """ Usage:
@@ -37,23 +39,50 @@ def user_notes_list(parser, tokens):
             "%r tag's third argument should be 'as'" % tag_name
     return UserNotesListNode(request, author, dest)
 
+
+@register.tag
+def user_notes_list_with_query(parser, tokens):
+    """ Usage:
+        {% user_notes_list request author query as list_notes %}
+    """
+    try:
+        tag_name, request, author, query, _as, dest = tokens.split_contents()
+    except ValueError:
+        raise template.TemplateSyntaxError, \
+            "%r tag requires exactly five arguments" % tag_name
+    if _as != "as":
+        raise template.TemplateSyntaxError, \
+            "%r tag's fourth argument should be 'as'" % tag_name
+
+    user_notes_list_node = UserNotesListNode(request, author, dest)
+    user_notes_list_node.query = query
+
+    return user_notes_list_node
+
+
 class UserNotesListNode(template.Node):
     def __init__(self, request, author, dest):
         self.request = template.Variable(request)
         self.author = template.Variable(author)
         self.dest = dest
+        self.query = None
+
 
     def render(self, context):
         request = self.request.resolve(context)
         author = self.author.resolve(context)
 
         # XXX: Replace this with a NotesManager
-        all_notes = Note.objects.filter(author=author) \
+        list_notes = Note.objects.filter(author=author) \
                                 .order_by('-pinned', '-user_modified')
         if request.user != author:
-            all_notes = all_notes.filter(permissions=1)
-        
-        context[self.dest] = all_notes[:settings.SNOWY_LIST_MAX_NOTES]
+            list_notes = list_notes.filter(permissions=1)
+            
+        if self.query:
+            query = template.Variable(self.query).resolve(context)
+            list_notes = list_notes.filter(Q(title__icontains=query) \
+                                       | Q(content__icontains=query))
+        context[self.dest] = list_notes[:settings.SNOWY_LIST_MAX_NOTES]
         return ''
 
 
diff --git a/notes/urls.py b/notes/urls.py
index 6f3a68f..bfa84ac 100644
--- a/notes/urls.py
+++ b/notes/urls.py
@@ -24,4 +24,5 @@ urlpatterns = patterns('',
     url(r'^search/$', 'snowy.notes.views.note_search', name='note_search'),
     url(r'^(?P<note_id>\d+)/$', 'snowy.notes.views.note_detail', name='note_detail_no_slug'),
     url(r'^(?P<note_id>\d+)/(?P<slug>[^/]+)/$', 'snowy.notes.views.note_detail', name='note_detail'),
+    url(r'^(?P<note_id>\d+)/(?P<slug>[^/]+)/search/$', 'snowy.notes.views.note_detail_with_query', name='note_detail_with_query')
 )
diff --git a/notes/views.py b/notes/views.py
index f2f0697..408b23d 100644
--- a/notes/views.py
+++ b/notes/views.py
@@ -72,6 +72,10 @@ def note_search(request, username,
 
 def note_detail(request, username, note_id, slug='',
                 template_name='notes/note_detail.html'):
+    return note_detail_with_query(request, username, note_id, slug, template_name=template_name)
+
+def note_detail_with_query(request, username, note_id, slug='', query='',
+                        template_name='notes/note_detail_with_query.html'):
     def clean_content(xml, author):
         """
         Adds an id attribute to <link:internal> tags so that URLs can be
@@ -108,6 +112,7 @@ def note_detail(request, username, note_id, slug='',
     
     style, doc, result = None, None, None
  
+    # Parse the tomboy note format into HTML
     try:
         styledoc = libxml2.parseFile('data/note2xhtml.xsl')
         style = libxslt.parseStylesheetDoc(styledoc)
@@ -127,8 +132,14 @@ def note_detail(request, username, note_id, slug='',
         if doc != None: doc.freeDoc()
         if result != None: result.freeDoc()
 
+    if request.method == 'GET':
+        form = SearchForm(request.GET)
+        if form.is_valid():
+            query = request.GET['query']
+
     return render_to_response(template_name,
                               {'title': note.title,
                                'note': note, 'body': body,
-                               'request': request, 'author': author},
+                               'request': request, 'author': author,
+                               'query': query},
                               context_instance=RequestContext(request))
