

$(document).ready(function () {
	
$(function() {
		//HANDLES IMAGE HOVER
    $("img.hover")
        .mouseover(function() { 
            var src = $(this).attr("src").match(/[^\.]+/) + "_hover.png";
            $(this).attr("src", src);
        })
        .mouseout(function() {
            var src = $(this).attr("src").replace("_hover", "");
            $(this).attr("src", src);
        });
        
        
        

});

						

});

//CUFON
Cufon.replace('.garamond',{ fontFamily: 'Adobe Garamond Pro' });    
Cufon.replace('.nyala',{ fontFamily: 'Nyala' });      
Cufon.replace('.header li a.graphic',{ fontFamily: 'Nyala', textShadow: '#000 1px 1px',	hover: true,  hoverables: { a: true }  });     
Cufon.replace('.footer_items span',{ fontFamily: 'Adobe Garamond Pro' });    
Cufon.replace('.box2 span',{ fontFamily: 'Adobe Garamond Pro' });   
Cufon.replace('.container_inner h2',{ fontFamily: 'Nyala' });   
Cufon.replace('.box2 div',{ fontFamily: 'Adobe Garamond Pro' });  
Cufon.replace('.box2 .blueprint',{ fontFamily: 'Nyala' });  





/*
 * Droppy 0.1.2
 * (c) 2008 Jason Frame (jason@onehackoranother.com)
 */
$.fn.droppy = function(options) {
    
  options = $.extend({speed: 250}, options || {});
  
  this.each(function() {
    
    var root = this, zIndex = 1000;
    
    function getSubnav(ele) {
      if (ele.nodeName.toLowerCase() == 'li') {
        var subnav = $('> ul', ele);
        return subnav.length ? subnav[0] : null;
      } else {
        return ele;
      }
    }
    
    function getActuator(ele) {
      if (ele.nodeName.toLowerCase() == 'ul') {
        return $(ele).parents('li')[0];
      } else {
        return ele;
      }
    }
    
    function hide() {
      var subnav = getSubnav(this);
      //if (!subnav) return;
      if (!subnav || subnav == this) return;
      $.data(subnav, 'cancelHide', false);
      setTimeout(function() {
        if (!$.data(subnav, 'cancelHide')) {
          $(subnav).hide();
          //$(subnav).slideUp(options.speed);
        }
      }, 50);
          
      
    }
  
    function show() {
      var subnav = getSubnav(this);
      if (!subnav) return;
      $.data(subnav, 'cancelHide', true);
      $(subnav).css({zIndex: zIndex++}).slideDown(options.speed);
      if (this.nodeName.toLowerCase() == 'ul') {
        var li = getActuator(this);
        $(li).addClass('hover');
        $('> a', li).addClass('hover');
      }
    }
    
    $('ul, li', this).hover(show,hide);
    $('.container_inner', this).mouseover(hide);
    //$('ul, li', this).mouseout(hide);
    //$('.submenu, #nav, ul, li').mouseout(function() { $("#nav").html('out');  });
    
    
    $('li', this).hover(
      function() { $(this).addClass('hover'); $('> a', this).addClass('hover'); },
      function() { $(this).removeClass('hover'); $('> a', this).removeClass('hover'); }
    );
    
    $('#nav',this).mouseout(hide);
    
  });
  
};

        
       //TOP MENU 

      
  $(function() {
    $('#nav').droppy();
  });
     
//=======================
function checkEmail(myForm) {
if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(myForm.p_email.value)){
return (true)
}
alert("Please enter valid email address");
return (false)
}