// JavaScript Document

$(document).ready( function(){
	
	
	/*
	----------------------------------------------------------
	01. FONT REPLACEMENT
	---------------------------------------------------------- */
	Cufon.replace('h1')('h2'); 
	Cufon.replace('#nav-main li:not(.attorneys) a', { hover:true });
	
	/* http://flowplayer.org/tools/demos/overlay/index.html */
	/*$("button[rel]").overlay();*/
	/* http://flowplayer.org/tools/demos/overlay/apple.html */
	$("button[rel]").overlay({effect: 'apple'});

	
	/* For drop vCard menu on contact */
	 $('#cardList li').hover(  
         function () {  
             //show its items  
             $('ul', this).slideDown(100);  
   
         },   
         function () {  
             //hide its items  
             $('ul', this).slideUp(100);           
         }  
     );  
	 
	 /*For News Page */
	//$("ul.tabs").tabs("div.panes > div");
	
// END ON READY


		
		 if (document.getElementById('inner')){

          document.getElementById('inner').style.height = 'auto';
          needed_height = document.getElementById('inner').offsetHeight;
 


         var viewportheight;
 
                  // the more standards compliant browsers (mozilla/netscape/opera/IE7) use window.innerWidth and window.innerHeight
 
          if (typeof window.innerWidth != 'undefined')
             {
                 viewportheight = window.innerHeight
             }
 
              // IE6 in standards compliant mode (i.e. with a valid doctype as the first line in the document)

             else if (typeof document.documentElement != 'undefined' && typeof document.documentElement.clientWidth != 'undefined' && document.documentElement.clientWidth != 0)
             {
                viewportheight = document.documentElement.clientHeight
             }
 
               // older versions of IE
 
             else
           {
              viewportheight = 360
            }
 

      useable_inner = viewportheight - 360;
      
			
              
      if (useable_inner < 360) {useable_inner = 360;}

        document.getElementById('inner').style.height="360px";
          
      if (useable_inner >= needed_height) {
       


              document.getElementById('inner').style.height="auto";
              document.getElementById('toggle').style.display="none";
                  
          
      }
		
		}
		




});
function allOff() {
		document.getElementById("mark").style.background = "#114385";
		document.getElementById("mark").style.color = "#FFF";
		document.getElementById("forrester").style.display = "none";
		document.getElementById("emily").style.background = "#114385";
		document.getElementById("emily").style.color = "#FFF";
		document.getElementById("alexander").style.display = "none";
		document.getElementById("steven").style.background = "#114385";
		document.getElementById("steven").style.color = "#FFF";
		document.getElementById("thomas").style.display = "none";
	}
	
function toggle_color(id) {
       document.getElementById(id).style.background = "#1d2325";
	   document.getElementById(id).style.color = "#2d73af";
    }
	
function toggle_visibility(id) {
       document.getElementById(id).style.display = "block";
    }
    
    
    
    
    
    
    
    
    
    
