r = "/";

function initSIFR()
{
   sIFR.replaceElement("h1", named({sFlashSrc: r+"swf/officina-bold.swf", sColor: "#2e6194", sWmode: "transparent"}));
   sIFR.replaceElement("h2", named({sFlashSrc: r+"swf/officina-bold.swf", sColor: "#ffffff", sWmode: "transparent"}));
   sIFR.replaceElement("h3", named({sFlashSrc: r+"swf/officina.swf", sColor: "#ffffff", sWmode: "transparent"}));
}

function navOn()
{
   document.getElementById("nav").style.zIndex = 10;
   document.getElementById("cont").style.zIndex = 1;
}

function navOff()
{
   document.getElementById("nav").style.zIndex = 1;
   document.getElementById("cont").style.zIndex = 10;
}

function clearField(obj,orig)
{
   if (obj.value == orig) obj.value = "";
}

function signup()
{
   $("#signup form#f_signup").submit(function(){
      $.ajax({
         type: "POST",
         url: r+"signup.php",
         data: $("#signup form#f_signup").serialize(),
         success: function(msg){
            $("#resp").html(msg);
         }
      })
      return false;
   })
}

function initTabs()
{
   $(document).ready(function(){
      $(".tab-cont").hide();
      $(".tab-cont:first").show();
      $(".tab-cont ul li:last-child").addClass("last");
      $("ul.tabs li:first a").addClass("sel");
      $("ul.tabs li a").click(function(){
         $("ul.tabs li a").removeClass("sel");
         $(this).addClass("sel");
         var curTab = $(this).attr("href");
         $(".tab-cont").hide();
         $(curTab).show();
         return false;
      })
   })
}

function initOverlay()
{
	$(function(){ 
	   $("a[rel]").overlay(
	   {
	      expose: { color: '#ffffff', opacity: 0.7 },
	      onLoad: function() { 
	         this.getContent().find("div.w").load(this.getTrigger().attr("href")); 
	      }
	   })
	})
}