function URLEncode (clearString) {
  var output = '';
  var x = 0;
  clearString = clearString.toString();
  var regex = /(^[a-zA-Z0-9_.]*)/;
  while (x < clearString.length) {
    var match = regex.exec(clearString.substr(x));
    if (match != null && match.length > 1 && match[1] != '') {
    	output += match[1];
      x += match[1].length;
    } else {
      if (clearString[x] == ' ')
        output += '+';
      else {
        var charCode = clearString.charCodeAt(x);
        var hexVal = charCode.toString(16);
        output += '%' + ( hexVal.length < 2 ? '0' : '' ) + hexVal.toUpperCase();
      }
      x++;
    }
  }
  return output;
}


function searchit(){
alert('searchit!');
}

function search(){
alert(document.sform.site.value);
terms = $("#searchterms").val();
terms = URLEncode(terms);
window.location = "/search/node/" + terms;
return false;
}

window.onload = pop;

function pop() {
$("#loadmsg").hide();
$("#featurebox").fadeIn();
}

	$(document).ready(function () {
    
	
	
$("#tab2 .tabset-column a").each(function (i) {
$(this).click(function() {
$("#tab2 .tabs-content div").css("display","none");
$("#tab2 .tabs-content div:nth-child("+(i+1)+")").fadeIn("fast");
})
});

$("#tab1 .tabset-column a").each(function (i) {
$(this).click(function() {
$("#tab1 .tabs-content div").css("display","none");
$("#tab1 .tabs-content div:nth-child("+(i+1)+")").fadeIn("fast");
})
});

});


	  
	
/*

  $("#admin-panel").hover(  
         function()  
         {  
            $(this).animate({ 
			marginLeft: 0 
			}, 250);  
        },        
        function()  
        {  
            $(this).animate({ 
			marginLeft: -200
			}, 250);  
       });  
	   
	   });

	   function jumpState(val){
	   if(val.value != "none") {
	   window.location = val.value;
	   }
	   
	   }
*/

