/*
*------------------------------------------------------------------------------------------+
* COMPANY: Raven Developers 2009
+------------------------------------------------------------------------------------------+
* FILE INFO: Site wide Java Script functions
+------------------------------------------------------------------------------------------+
* WEBSITE: http://www.ravendevelopers.com
+------------------------------------------------------------------------------------------+
* Portions created by Anirudh K. Mahant are Copyright of Raven Developers (C) 2009.
+------------------------------------------------------------------------------------------+
* COPYRIGHT NOTICE:
* The original author(s) retain all the copyrights of this file.
* Portions created by Anirudh K. Mahant (original developer) are Copyright of Raven Developers (C) 2009.
* Portions may contain jQuery JavaScript framework developed by John Resig and other
* community members. More info at http://docs.jquery.com/About
* jQuery LICENSE:
* Copyright (c) 2008 John Resig (jquery.com)
* Dual licensed under the MIT (MIT-LICENSE.txt) and GPL (GPL-LICENSE.txt) licenses.
+-------------------------------------------------------------------------------------------+
*/
function URLDecode(psEncodeString){
  var lsRegExp=/\+/g;
  return unescape(String(psEncodeString).replace(lsRegExp," "));
}
function ZebraTables(){
  theTable=jQuery.find("table.zeetable");
  jQuery(theTable).each(function(i){
    if(this){
      jQuery(this).find("tr").each(function(i){
        var zclass=(i%2==0)?"odd":"even";
        jQuery(this).addClass(zclass);
      });
    }
  });
}
function ZebraUL(){
  theUL=jQuery(document).find("ul.zeeul");
  jQuery(theUL).each(function(i){
    if(this){
      jQuery(this).find("li").each(function(i){
        var zclass=(i%2==0)?"odd":"even";
        jQuery(this).addClass(zclass);
      });
    }
  });
}
function BlurFocusText(){
  theText=jQuery("input.blur-focus");
  jQuery(theText).each(function(i){
    if(this){
      jQuery(this).blur(function(){
        if(this.value==""){
          this.value=this.defaultValue;
        }
      });
    jQuery(this).focus(function(){
      if(this.value==this.defaultValue){
        this.value="";
      }
    });
   }
 });
}
jQuery(document).ready(function(){
  ZebraTables();
  ZebraUL();
  BlurFocusText();
  jQuery(function(){
    var tabContainers=jQuery("div.tabs > div");
    jQuery("div.tabs ul.tabNavigation a").click(function(){
      tabContainers.hide().filter(this.hash).fadeIn("slow");
      jQuery("div.tabs ul.tabNavigation a").removeClass("selected");
      jQuery(this).addClass("selected");
      return false;
    }).filter(":first").click();
  });
});