$(document).ready(function(){

$("#top").load("top.html", function(data){

$("#open").click(function () {
      		if ($("#brook_links").is(":hidden")) $("#brook_links").slideDown("fast");
      		else $("#brook_links").slideUp("fast");
	  });

		

});


$("#header").load("header.html", function(data){
   $("#nav li:has(ul)").hover(function(){

        $(this).children("ul").show();
  
    	}, function(){
    
        $(this).children("ul").hide();
	
    });
});

$("#footer").load("footer.html");


    /*************************************
     * Drop Down Menu OLD CODE
     *
     *   $("#nav li:has(ul)").hover(function(){

        $(this).children("ul").show();
  
    	}, function(){
    
        $(this).children("ul").hide();
	
       });


// IE Fix for XML Parsing...
function parseXml(xml)
{  
	if (jQuery.browser.msie) 
	{  
   		var xmlDoc = new ActiveXObject("Microsoft.XMLDOM");  
		xmlDoc.loadXML(xml);  
 		xml = xmlDoc;  
 	}  
 return xml;  
}  
 

$.ajax({
	type: "GET",
	url: "http://www.ccisd.net/schools/schoolwebs/3/js/data.xml",
	dataType: ($.browser.msie) ? "text" : "xml",
	success: function(xml) {
			
			  var newXML = parseXml(xml); 
			$(newXML).find('event').each(function()
			{
						var month = $(this).find('month').text();
						
						var day = $(this).find('day').text();
						
						var desc = $(this).find('desc').text();

                     $('<li></li>').html('<p><span class="small_month">'+month+'</span><span class="day">'+day+'</span></p>'+desc+'').appendTo('#upcoming_cal ul');

			});
	}
	});


     *************************************/

	
	


  $("#search input").focus(function() {  


		$(this).val("");
		$(this).css("color","#686868");
		
    });
	





 
});
