/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  Default JS Library.
  by DesignSlicer.com _ info@designslicer.com _
  Aug 08 revision.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
ieHover = function() {
  var ieEls = document.getElementById("page").getElementsByTagName("LI");
  for (var i=0; i<ieEls.length; i++) {
    ieEls[i].onmouseover=function() {
      this.className+=" hover";
    }
    ieEls[i].onmouseout=function() {
      this.className=this.className.replace(new RegExp(" hover\\b"), "");
    }
  }
}
if (window.attachEvent) window.attachEvent("onload", ieHover);
try{document.execCommand("BackgroundImageCache",false,true);}catch(err){}
jQuery(document).ready(function() {
  jQuery("#featured #videos").jcarousel({
    horizontal: true,
    scroll: 1
  });
  jQuery("#categories").jcarousel({
    horizontal: true,
    scroll: 5
  });
  jQuery('#searchform input[value]').each(function(){
    if(this.type == 'text') {
      jQuery(this).focus(function(){
        if (this.value == this.defaultValue) {
          this.value = '';
        }
      }).blur(function(){
        if (!this.value.length) {
          this.value = this.defaultValue;
        }
      });
    }
  });
  jQuery("#featured input").click(function(){this.select();});
});
function striper(parentElementTag, parentElementClass, childElementTag, styleClasses)
{
  var i=0,currentParent,currentChild;
  if ((document.getElementsByTagName)&&(parentElementTag)&&(childElementTag)&&(styleClasses)) {
    var styles = styleClasses.split(',');
    var parentItems = document.getElementsByTagName(parentElementTag);
    while (currentParent = parentItems[i++]) {
      if ((parentElementClass == null)||(currentParent.className == parentElementClass)) {
        var j=0,k=0;
        var childItems = currentParent.getElementsByTagName(childElementTag);
        while (currentChild = childItems[j++]) {
          k = (j+(styles.length-1)) % styles.length;
          currentChild.className = currentChild.className+" "+styles[k];
        }
      }
    }
  }
}
function stripe() {
  striper('ul','','li','odd,even');
}
window.onload=stripe;
