// JavaScript Document

jQuery(document).ready(function(){

	$('#order_class_update').click(function() {
		$('#order_class_update_input').val('1');
		$('#order_class_first_form').submit();
	});

	$('#order_class_submit').click(function() {
		$('#order_class_submit_input').val('1');
		$('#order_class_first_form').submit();
	});
		
	$('.order_class_phone').click(function(){
		if($('#order_class_place_holder').val() == '1'){
		}else{
			$('.order_class_phone').val('');
			$('#order_class_place_holder').val('1');
		}
	});
	
	jQuery('#main_menu li').siblings().find('a').addClass('cufon_effect');
	jQuery('#main_menu li li').siblings().find('a').removeClass('cufon_effect');
	
	sidebar_height = jQuery('#column_right_single, #column_right_products').height();
	jQuery('#column_left_single, #column_left_products').height(sidebar_height + 'px');
								
	jQuery('#main_menu').superfish({
		delay:       800,
		animation:   { opacity: 'show', height:'show' },
		speed:       300,
		autoArrows:  true,
		anchorClass : 'sf-with-ul',
		arrowClass  : 'sf-sub-indicator',
		dropShadows: false
	});
	
    jQuery('#banner_home').cycle({
		fx:     'fade',
		speed:  'slow',
		after:  function(idx, slide) { jQuery('#banner_title').text(slide.alt); },
		pager:	'#banner_page',
    	pagerAnchorBuilder: function(idx, slide) { return '<li><a href="#">' + (idx + 1) + '</a></li>'; }
	});
	
	/*** 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");
		}
	});
	
	/*** Cufon ***/
	/** ----------------------------------------------------- **/
		
	Cufon.replace(
				  
		'.font_gill_sans, .cufon_effect, .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: 'Gill Sans MT', hover: true });

	
});

/*** Functions ***/
/** ----------------------------------------------------- **/


