		function doClear(theText) { if (theText.value == theText.defaultValue) { theText.value = "" } }
		function doDefault(theText) { if (theText.value == "") { theText.value = theText.defaultValue } }
		
		
// jQuery
jQuery(document).ready(function(){

	$(window).load(function(){
		$("#shadow_back").height($("#shadow").height());
	});	

	$("#panel").height($("#in_footer").height() + 30);
	var panel_height = $("#panel").height() + 90;
	$("#footer").css({height:panel_height+'px'});
	$("#footer_box").css({height:panel_height+'px','margin-top':'-'+ panel_height+'px'});
	$("#main").css({'padding-bottom':panel_height+'px'});
	if ($("#switcher").is('.hide')) {
		$("#footer_box").css({height:'90px','margin-top':'-90px'});
 			$("#footer").css({height:'90px'});
			$("#main").css({'padding-bottom':'90px'});
			if($.browser.version === "6.0")
				{ 
					$("#pusher").css({height:'90px'});
				}
			$("#panel").slideUp(20);
	}

	
	$("#switcher").click(function () {
		var d = new Date();
		d.setFullYear(d.getFullYear() + 1)
		if ($("#panel").is(":hidden")) {
 			$("#footer").css({height:panel_height+'px'});
			$("#footer_box").css({height:panel_height+'px','margin-top':'-'+panel_height+'px'});
			$("#main").css({'padding-bottom':panel_height+'px'});
			if ($.browser.version === "6.0")
				{ 
					$("#pusher").css({height:panel_height+'px'});
				}
			window.scrollBy(0,panel_height);
			$("#panel").slideDown(0);
			$(this).removeClass("hide");
			$(this).addClass("show");
			document.cookie = "bottombox=show; expires=" + d.toUTCString() + "; path=/;";
		} else {
			$("#footer_box").css({height:'90px','margin-top':'-90px'});
 			$("#footer").css({height:'90px'});
			$("#main").css({'padding-bottom':'90px'});
			if ($.browser.version === "6.0")
				{ 
					$("#pusher").css({height:'90px'});
				}
			$("#panel").slideUp(0);							   
			$(this).addClass("hide");
			$(this).removeClass("show");
			document.cookie = "bottombox=hide; expires=" + d.toUTCString() + "; path=/;";
		}
		return false;
	});
	
	$("#useful .docitem").click(function(){
        window.location=$(this).find("a").attr("href"); return false;
 	});

	
/*	$(function() {
		$( "#accordion" ).accordion({ active: false, clearStyle: true});
//		$( "#accordion" ).accordion({ active: false, collapsible: true,  clearStyle: true});
	});
*/	

    $("a[rel='colorboxImg']").colorbox({photo: true});
	$("a[rel='colorboxTitle']").colorbox({photo: true});
		 
});
	
