// JavaScript Document

jQuery(document).ready(function(){
								
	//initialize navigation for the dropdown effect
	jQuery('#navigation').superfish({
		delay:		   0,
		animation:     {opacity: 'show', height:'show'},
		speed:         300,
		autoArrows:    true,
		anchorClass:   'sf-with-ul',
		arrowClass:    'sf-sub-indicator',
		dropShadows:   false
	}
	);
	
	jQuery('ul.drawers_list').accordion({ 	
		header: ".drawer_handle"
	})
	
	/*** FX ***/
	/** ----------------------------------------------------- **/

	jQuery('.fx_button_hover').hover(
	  function () {
		jQuery(this).css('background-position', 'left bottom');
	  },
	  function () {
		jQuery(this).css('background-position', 'left top');
	  }
	);
	
	jQuery('.fx_input_field').focus(function() {
		if (this.value == this.defaultValue){
			jQuery(this).css("color", "#eee");
			this.value = '';
		}
		if(this.value != this.defaultValue){
			this.select();
		}
	});
	jQuery('.fx_input_field').blur(function() {
		if ($.trim(this.value) == ''){
			this.value = (this.defaultValue ? this.defaultValue : '');
			jQuery(this).css("color", "#777");
		}
	});
	
});

/*** Functions ***/
/** ----------------------------------------------------- **/

jQuery(function(){ //smoothscroll
	jQuery('.smooth_scroll').click(function() {
		if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') 
			&& location.hostname == this.hostname) {
				var $target = $(this.hash);
				$target = $target.length && $target || $('[name=' + this.hash.slice(1) +']');
			if ($target.length) {
				var targetOffset = $target.offset().top;
				$('html,body').animate({scrollTop: targetOffset}, 1000);
				return false;
			}
		}
	});
});

function zebra_table(){ //zebra table

	jQuery('tbody tr:nth-child(odd)').addClass('odd');
  
}

Cufon.replace(
			  
	'.font_univers_condensed'
				  
,{ fontFamily: 'univers condensed', hover: true });

Cufon.replace(
			  
	'.font_bd_hanover, ' +
	'.home_section_title, ' +
	'.drawer_handle, ' + 
	'.basic_style_1 h1, .basic_style_1 h2, .basic_style_1 h3, .basic_style_1 h4, .basic_style_1 h5, .basic_style_1 h6,'
				  
,{ fontFamily: 'BD Hanover', hover: true });

