﻿/// <reference path="jquery-1.3.2-vsdoc2.js" />


function formatText(index, panel) {
  return index + "";
}

//CMS class

function cms(){
  this.Search = function(q){
    if (q.length > 2) {
      var qs = "?q=" + encodeURIComponent(q);
      window.location.href = "/search/" + qs;
      }
  }
}

var $CMS = new cms();


$(function(){
  $("#inputSearchTop,#inputSearchBottom").keypress(function(e){
    if (e.which == 13) {
      $CMS.Search($(this).val());
    }
  });
  
  $("#search-btn,.search-btn").click(function(e){
    $CMS.Search($(this).parent().find("INPUT").eq(0).val());
    return false;
  });
});
