$(document).ready(function(){
	 // Accordion Menu Script
		$("dd:not(:first)").hide();
		$("dt a").click(function(){
			$("dd:visible").slideUp("fast");
			$(this).parent().next().slideDown("fast");
			return false;
		});
});
//################## JQuiry SRCIPT ######################

//#######################################
function includeJS(jsPath){
  var js = document.createElement("script");
  js.setAttribute("type", "text/javascript");
  js.setAttribute("src", jsPath);
  document.getElementsByTagName("head")[0].appendChild(js);
}

// use this to inact > includeJS("http://www.url.com");
// THis can only work with DOM2 Browsers

//#######################################
// OnLoad Script #####################

function addLoadEvent(func) {
 var oldonload = window.onload;
 if (typeof window.onload != 'function') {
 window.onload = func;
 } else {
 window.onload = function() {
 oldonload();
 func();
 }
 }
}

//#######################################
// End OnLoad Script #####################

//#######################################
// Insert After script #####################

function insertAfter(newElement,targetElement) {
 var parent = targetElement.parentNode;
 if (parent.lastChild == targetElement) {
 parent.appendChild(newElement);
 } else {
 parent.insertBefore(newElement,targetElement.nextSibling);
 }
}
//#######################################
// End Insert After script #####################


//#######################################
// Add Class script #####################

function addClass(element,value) {
 if (!element.className) {
 element.className = value;
 } else {
 newClassName = element.className;
 newClassName+= " ";
 newClassName+= value;
 element.className = newClassName;
 }
}
//#######################################
// End Add Class script #####################



// Google Map Script
    //<![CDATA[

    function load() {
      if (GBrowserIsCompatible()) {
        // LOcation code
        var map = new GMap2(document.getElementById("map"));
        map.setCenter(new GLatLng(40.576486,-105.073875), 15);
        // Marker Code
		var marker = new GMarker(new GLatLng(40.57145,-105.076987));
		
		map.addOverlay(marker);
        // Control Bars
        map.addControl(new GMapTypeControl());
        map.addControl(new GLargeMapControl());
        //Info Code
       var html="<div style='width: 250px; display: block;'>" +
        "<a style='float: left; margin: 0px 10px 0px 0px; display: block;' title='Get Directions' target='_blank' href='http://maps.google.com/maps?hl=en&ie=UTF8&q=Alpha+Center&near=1212+S+College+Ave,+Fort+Collins,+CO+80524&fb=1&cid=0,0,7114582148412043738&z=16&iwloc=A'>" +
        "<img src='http://www.thealphacenter.org/images/center.jpg'"+
        "alt='The Alpha Center' border='0'><br/>Get Directions</a>" +
        "<div style='display: block; float: left; margin: 0px 0px 0px 0px;'>" +
        "<h2>Alpha Center</h2>" +
         "1212 S College Ave <br/>" +
         "Fort Collins, CO 80524 <br/>" +
         "(970) 221-5121" +
         "</div>"+
        "</div>";
		marker.openInfoWindowHtml(html);
        
        GEvent.addListener(marker, "click", function() {
 			map.closeInfoWindow();
 			});

 			GEvent.addListener(marker, "click", function() {
		    marker.openInfoWindowHtml(html);
 			});
      }
     
    }
    
  
   
    //]]>
    
addLoadEvent(load);  
addUnLoadEvent(GUnload); 

