(function($){
			
$(document).ready(function() {
	 
	 Cufon.replace('#hmenu ul li a');
	 Cufon.replace('#hmenu ul li a.sel');
	 
	 Cufon.replace('h2:not(.sitemap)');
	 
	 Cufon.replace('#hp2 #cp span');
	 Cufon.replace('#hp2 #cp h1');
	 
	 Cufon.replace('#testimonials div span');
	 Cufon.replace('#testimonials div blockquote');
	 
	 $('#menu li:has(ul)').hover(
		function(){
			$(this).css('background-color', '#177AC0');
		},
		function(){
			$(this).css('background-color', '');
		}
	);
	
	$('#menu li ul li:not(.blue)').hover(
		function(){
			$(this).css('background-color', '#8e9fbd');
		},
		function(){
			$(this).css('background-color', '#e2e7f5');	
		}
	);
	
	 $('#menu li:has(ul)').hover(
		function(){
			tempH=($('ul li',this).size()-1)*30+2;
			$('ul li.blue',this).css('height',tempH-40+'px');
			//$('ul',this).stop().animate({height:tempH+'px'},400);
			$('ul',this).css('height',tempH+'px');
		},
		function(){
			//$('ul',this).stop().animate({height:'0px'},400);
			$('ul',this).css('height','0px');
		}
	);
	 
	 /* INPUT RESET */
	 $('input:text').each(function(){
	  tempform='';
	  $(this).focus(function()
	  {
	  		if($(this).val()==$(this).attr('title')){tempform = $(this).val();$(this).val('');}
	  		if ($(this).hasClass('contact')) $(this).css('background','#e2e7f5');
	  		if ($(this).hasClass('search')) $(this).css('color','#999999');
	  }
	  				);
	  $(this).blur(function()
	  	{
	  		if($(this).val()==''){$(this).val(tempform);}
	  		if ($(this).hasClass('contact')) $(this).css('background','#ffffff');
	  	}
	  				);
	 });
	$('textarea.contact').each(function(){
	  tempform='';
	  $(this).focus(function()
	  {
	  		$(this).css('background','#e2e7f5');
	  }
	  				);
	  $(this).blur(function()
	  	{
	  		$(this).css('background','#ffffff');
	  	}
	  				);
	 });
	 
	 /* fancybox */
	 $("a.inline").fancybox({ 
	 	'frameWidth' :720,
	 	'frameHeight' :410,
	 	'zoomSpeedIn': 300, 
	 	'zoomSpeedOut': 300,
	 	'overlayOpacity': 0.7,
	 	'overlayColor': '#000000',
	 	'overlayShow': true,
	 	'hideOnContentClick': true,
	 	'centerOnScroll': false
	 }); 
	 
	 $("a.big-deal").fancybox({ 
	 	'frameWidth' :565,
	 	'frameHeight' :400,
	 	'zoomSpeedIn': 300, 
	 	'zoomSpeedOut': 300, 
	 	'padding': 0,
	 	'overlayShow': true,
	 	'overlayOpacity': 0.7,
	 	'overlayColor': '#000000',
	 	'hideOnContentClick': true,
	 	'centerOnScroll': false
	 }); 
	 
	 
	 $("a").filter(function() {
        return this.hostname && this.hostname !== location.hostname;
    }).attr('target', '_blank');

	
});

})(jQuery);