// JavaScript Document

jQuery(document).ready(function(){
								
	jQuery('#main_menu').superfish({
		delay:		   0,
		animation:     {opacity: 'show', height:'show'},
		speed:         300,
		autoArrows:    true,
		anchorClass:   'sf-with-ul',
		arrowClass:    'sf-sub-indicator',
		dropShadows:   false,
		disableHI:     true,
		onInit:        function(){},
		onBeforeShow:  function(){},
		onShow:        function(){},
		onHide:        function(){}
	}
	);
	
	var settings = {
	  tl: { radius: 8 },
	  tr: { radius: 8 },
	  bl: { radius: 0 },
	  br: { radius: 0 },
	  antiAlias: true }
	
    curvyCorners(settings, ".roundify_top_5");
	
	jQuery('#main_menu li a.parent_button_nav').hover(
	  function () {
		jQuery(this).addClass('nav_hovered');
		jQuery(this).find('span').addClass('nav_hovered');
	  },
	  function () {
		jQuery(this).removeClass('nav_hovered');
		jQuery(this).find('span').removeClass('nav_hovered');
	  }
	);
	
	/*** Cufon ***/
	/** ----------------------------------------------------- **/
		
	Cufon.replace(
				  
		'.font_freebooter, #main_content h2 span'
					  
	,{ fontFamily: 'Freebooter Script', hover: true });
	
});

/*** 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');
  
}
