$(document).ready(function() {
	$("div.panel_button").click(function(){
		$("div#panel").animate({
			height: "400px"
		})
		.animate({
			height: "300px"
		}, "fast");
		$("div.panel_button").toggle();
	
	});	
	
   $("div#hide_button").click(function(){
		$("div#panel").animate({
			height: "0px"
		}, "fast");
		
	
   });	




	//global vars
	var searchBoxes = $(".text");
	var searchBox = $("#txtsearch");
	var searchBoxDefault = "Search the site...";
	
	//Effects for both searchbox
	searchBoxes.focus(function(e){
		$(this).addClass("active");
	});
	searchBoxes.blur(function(e){
		$(this).removeClass("active");
	});
	
	//Searchbox2 show/hide default text if needed
	searchBox.focus(function(){
		if($(this).attr("value") == searchBoxDefault) $(this).attr("value", "");
	});
	searchBox.blur(function(){
		if($(this).attr("value") == "") $(this).attr("value", searchBoxDefault);
	});



});





function scrollWin(direction){
switch(direction){
					
					case 1 : $('html, body').animate({scrollTop: $(".sectionleft").offset().top}, 2000);
					break;
							
					case 2: $('html, body').animate({scrollTop: $("body").offset().top}, 2000);
					break;
					
					case 3 : $('html, body').animate({scrollTop: $("#webd").offset().top}, 2000);
					break;
					
					case 4 : $('html, body').animate({scrollTop: $("#pdev").offset().top}, 2000);
					break;
					
					case 5 : $('html, body').animate({scrollTop: $("#ecomm").offset().top}, 2000);
					break;

					case 6 : $('html, body').animate({scrollTop: $("#online").offset().top}, 2000);
					break;
					
					case 7 : $('html, body').animate({scrollTop: $("#sem").offset().top}, 2000);
					break;
					
					case 8 : $('html, body').animate({scrollTop: $("#hosting").offset().top}, 2000);
					break;
					
					case 9 : $('html, body').animate({scrollTop: $("#retainer").offset().top}, 2000);
					break;
					
					
				}
				
}

