// This contains all base javascript (e.g. siFR, swfobject calls, etc)

//  base.js
//  WebDevTemplate
//  
//  Created by Matt Dills on 2009-02-24.
//  Copyright 2008 Scully Group. All rights reserved.
// 
$(document).ready(function() {
	if(typeof sIFR=="function")(function(){var j=document;var h=j.documentElement;sIFR.removeDecoyClasses=function(){function a(b){if(b&&b.className!=null)b.className=b.className.replace(/\bsIFR-hasFlash\b/,"")}return function(){a(h);a(j.getElementsByTagName("body")[0])}}();sIFR.preferenceManager={storage:{sCookieId:"sifr",set:function(a){var b=new Date();b.setFullYear(b.getFullYear()+3);j.cookie=[this.sCookieId,"=",a,";expires=",b.toGMTString(),";path=/"].join("")},get:function(){var a=j.cookie.match(new RegExp(";?"+this.sCookieId+"=([^;]+);?"));if(a!=null&&a[1]=="false")return false;else return true},reset:function(){var a=new Date();a.setFullYear(a.getFullYear()-1);j.cookie=[this.sCookieId,"=true;expires=",a.toGMTString(),";path=/"].join("")}},disable:function(){this.storage.set(false)},enable:function(){this.storage.set(true)},test:function(){return this.storage.get()}};if(sIFR.preferenceManager.test()==false){sIFR.bIsDisabled=true;sIFR.removeDecoyClasses()}sIFR.rollback=function(){function a(b){var c,d,e,f,g,h;var l=parseSelector(b);var i=l.length-1;var m=false;while(i>=0){c=l[i];l.length--;d=c.parentNode;if(c.getAttribute("sifr")=="true"){h=0;while(h<d.childNodes.length){c=d.childNodes[h];if(c.className=="sIFR-alternate"){e=c;h++;continue}d.removeChild(c)}if(e!=null){f=e.firstChild;while(f!=null){g=f.nextSibling;d.appendChild(e.removeChild(f));f=g}d.removeChild(e)}if(!sIFR.UA.bIsXML&&sIFR.UA.bUseInnerHTMLHack)d.innerHTML+="";d.className=d.className.replace(/\bsIFR\-replaced\b/,"")};m=true;i--}return m}return function(k){named.extract(arguments,{sSelector:function(a){k=a}});if(k==null)k="";else k+=">";sIFR.removeDecoyClasses();sIFR.bHideBrowserText=false;if(a(k+"embed")==false)a(k+"object")}}()})()

  if(typeof sIFR == "function"){
    sIFR.replaceElement(named({sSelector:"h1", sFlashSrc:"/swf/phaistos-roman.swf", sColor:"#2c360d", sLinkColor:"#000000", nPaddingTop:"0", nPaddingBottom:"0", nPaddingLeft:"0", sWmode:"transparent"}));
    sIFR.replaceElement(named({sSelector:"h2", sFlashSrc:"/swf/phaistos-roman.swf", sColor:"#2c360d", sLinkColor:"#000000", nPaddingTop:"0", nPaddingBottom:"0", nPaddingLeft:"0", sWmode:"transparent"}));
    sIFR.replaceElement(named({sSelector:"h2.contentheading", sFlashSrc:"/swf/phaistos-roman.swf", sColor:"#2c360d", sLinkColor:"#000000", nPaddingTop:"0", nPaddingBottom:"0", nPaddingLeft:"0", sWmode:"transparent"}));
    sIFR.replaceElement(named({sSelector:"h3.event_heading", sFlashSrc:"/swf/phaistos-roman.swf", sColor:"#DDDFCB", sLinkColor:"#000000", nPaddingTop:"0", nPaddingBottom:"0", nPaddingLeft:"0", sWmode:"transparent"}));
    sIFR.replaceElement(named({sFlashVars: "textalign=center", sSelector:".column .form label span", sFlashSrc:"/swf/phaistos-roman.swf", sColor:"#513400", sLinkColor:"#000000", nPaddingTop:"0", nPaddingBottom:"0", nPaddingLeft:"0", sWmode:"transparent"}));
  }
	if( $('#map-menu #current').hasClass("item75") ){
		$('#map-menu #current').addClass("item75active");
	}
	
	if( $('#map-menu #current').hasClass("item65") ){
		$('#map-menu #current').addClass("item65active");
	}
	
	if( $('#map-menu #current').hasClass("item66") ){
		$('#map-menu #current').addClass("item66active");
	}
	
	// Dropdown Box   
    $('#dropdown ul li:has(ul)').hover(function()
    {
      $(this).addClass('nav-on');
       $(this).children('ul').show();
       $("#copy").addClass('transparent');
       currentHover = this;
    },
    function()
    {
      $(this).removeClass('nav-on');
       $(this).children("ul").hide();
       $("#copy").removeClass('transparent');
    });
    
    $("ul.menu-column-box-nav li.item3 a").attr({ 
      rel: "shadowbox;width=735;height=810"
    });

}); //end document.ready