        ZONTIK.Class.create("ZONTIK.Controls.Search", ZONTIK.Controls.Overlay, 
                function() {
                    ZONTIK.Controls.Overlay.call(this);
                }, 
                {
                    
                    totalResults: 0,
                    pg: 0,
                    pgLen: 5,
                
                    getNextPrevHTML: function() {
                        var html = '<div id="NextPrev">';
                        html += '<a href="javascript:' + ZONTIK.Delegate.createAsString(this, this.prev) + '" id="PrevSearch"><img src="/images/search.prev.gif"></a>';
                        html += '<a href="javascript:' + ZONTIK.Delegate.createAsString(this, this.next) + '" id="NextSearch"><img src="/images/search.next.gif"></a>';
                        html += '</div>';
                        return html;
                    },
                
                    getOverlayHtml: function() {
                        var html = '<div id="OverlayWrapper">';
                        var ieClass = "";
                        if (this.ieSupportCheck()) {
                            ieClass = 'class="OverlayNonIe"';
                        }
                        html += '<div id="SearchOverlay" ' + ieClass + '>';
                        html += '<div id="SearchOverlayContents">';
                        html += '<img src="/images/overlay.close.gif" id="SearchClose" onClick="' + ZONTIK.Delegate.createAsString(this, this.hide) + '">';
                        html += '<input type="text" id="SearchInput">';
                        html += '<img src="/images/search.submit.gif" id="SearchSubmit" onClick="'+ ZONTIK.Delegate.createAsString(this, this.search) +'">';
                        html += '</div>';
                        html += '<div class="Clear"></div>';
                        html += '<div id="SearchOverlayResults">';
                        html += '<div id="SearchOverlayResultsContents">';
                        html += '</div>';
                        //html += '<div id="SearchOverlayMore">';
                        //html += '<img src="images/search.more.gif">';
                        //html += '</div>';
                        html += '</div>';
                        html += '</div>';
                        html += '</div>';
                        return html;
                    },
                    
                    hide: function() {
                        $("#OverlayWrapper").remove();
                        this.unbindSearchUponEnter();
                    },
                    
                    initializeNextPrev: function() {
                        $("#SearchOverlayResultsContents").append(this.getNextPrevHTML());
                    },
                    
                    initializeSearchResults: function() {
                        if (this.totalResults > this.pgLen) { 
                            this.initializeNextPrev();
                        }
                        this.getSearchResults(0);
                    },
                    
                    next: function() {
                        if (this.pg < this.totalResults) {
                            this.pg++;
                        }
                        this.getSearchResults(this.pg);
                        if (this.totalResults > 0 && this.pg > 0) {
                            $("#PrevSearch").fadeIn();
                        }
                        if (((this.pg * this.pgLen) + this.pgLen ) >= this.totalResults) {
                            $("#NextSearch").fadeOut();
                        }
                    },
                    
                    
                    getSearchResults: function(n) {
                        $("#SearchOverlayResultsContents .SearchResult").show();
                        $("#SearchOverlayResultsContents .SearchResult:lt(" + (n * this.pgLen) + ")").hide();
                        $("#SearchOverlayResultsContents .SearchResult:gt(" + ((n * this.pgLen)+ this.pgLen-1) + ")").hide();
                    },
                    
                    prev: function() {
                        if (this.pg > 1) {
                            this.pg--;
                            $("#NextSearch").fadeIn();
                        } else {
                            this.pg--;                        
                            $("#PrevSearch").fadeOut();
                        }
                        
                        this.getSearchResults(this.pg);
                    },
                    
                    search: function() {
                        //$("#SearchOverlayResults").html(this.getSearchResultsHtml(results));
                        var thisContext = this;
                        this.pg = 0;
                        $("#SearchOverlayResultsContents").load("/search/?keywords=" + $("#SearchInput").val(), function() {
                            thisContext.totalResults = $("#SearchOverlayResultsContents .SearchResult").length;
                            thisContext.initializeSearchResults();
                        });
                        $("#SearchOverlayResults").show();
                    },
                    
                    searchUponEnter: function() {
                        var thisContext = this;
                        $("#OverlayWrapper input").keydown(function(event) {
                            if (event.keyCode == 13) {
                                thisContext.search();
                            }
                        });
                    },

                    show: function() {
                        this.hide();
                        if(document.magnifyOpen) {
                            magnify.close();
                        }
                        var isNotIe = this.ieSupportCheck();
                        if (isNotIe) {
                            $("#OverlayMatte").show();
                        }
                        $("#Menu").after(this.getOverlayHtml());
                        var searchLinkOffset = $("#SearchCatalogLink").offset();
                        if (isNotIe) {
                            $("#SearchOverlay").css("top", (searchLinkOffset.top - 10));
                        } else {
                            $("#SearchOverlay").css("top", (searchLinkOffset.top - 12));
                        }
                        $("#SearchOverlayResults").hide();
                        this.searchUponEnter();
                    },
                    
                    unbindSearchUponEnter: function() {
                        $("#OverlayWrapper input").keydown(function(event) {
                            //Do nothing.
                        });
                    }
                }
            );