	
	click_check = 0;
	
	function faq_align_text(){
		
		$("DIV.answer").each(function(i_index){
			
			div_height = $(this).height();
			
			// height = 1 row ; add top padding top DIV
			if( div_height < 50 ){
				$(this).css('padding-top', '10px');
			}
			
			// height = 2 rows; do nothing
			else if( div_height > 50 && div_height <= 70 ){
				
			}
			
			// 3 rows or more - align "A:" text
			else {
				
				$("DIV.faq_a DIV.letter").eq(i_index).css('padding-top', parseInt((div_height/2)-36)+'px');
				
			}

			
		});
		
	}
	
	function cf_inputs(){
		
		$("A.cf_submit").click(function(){
			
			// validate
			is_empty = "";
			
			if (document.site_contact_form.c_name.value == "" ) is_empty = is_empty + "\n- Your name";
			if (document.site_contact_form.c_email.value == "" ) is_empty = is_empty + "\n- Your email";
			if (document.site_contact_form.c_message.value == "" ) is_empty = is_empty + "\n- Your message / comment";
			if (is_empty != "")
			  alert("Please fill in:" + is_empty)			  
			else $("FORM#site_contact_form").submit();
			return false;
		});
		
		$("A.cf_reset").click(function(){
			$("FORM#site_contact_form")[0].reset();
			return false;
		});
		
		$("DIV.d_input INPUT , DIV.d_input_ta TEXTAREA").click(function(){
			$(this).focus();
		})
		
		$("DIV.d_input INPUT").focus(function(){
			
			// remove all css
			$("DIV.d_input_ta.active , DIV.d_input.active").removeClass("active");
			
			// add css on parent
			$(this).parent().addClass("active");

		});
		
		$("DIV.d_input_ta TEXTAREA").focus(function(){
			
			// remove all css
			$("DIV.d_input_ta.active , DIV.d_input.active").removeClass("active");
			
			// add css on parent
			$(this).parent().addClass("active");


		});
		
	}
	
	
	function products_link_height(){
		
		max_height = 0;
		
		$("#products_bar A").each(function( i_index ){
			
			if( $("#products_bar A").eq(i_index).height() > max_height ){ max_height = $("#products_bar A").eq(i_index).height(); }
			
		});
		
		$("#products_bar A").css('height', max_height);
		
	}
	
	function ReplaceSiteLink(){
		
		$("A.site_link").each(
 
			// For each hottie, run this code. The "indIndex" is the
			// loop iteration index on the current element.
			function( intIndex ){
		 		
		 		//---------------------- remove P outside A --------------------------
		 		if( $("A.site_link").eq(intIndex).parent()[0].tagName == "P" ){ $("A.site_link").eq(intIndex).parent().addClass('tag_remove'); }
				$(".tag_remove").each(
					function( removeIndex ){
						$(".tag_remove").eq(removeIndex).after(this.innerHTML).remove(); 
					}
				);
		 		//---------------------- /remove P outside A -------------------------
		 		
		 		this_link_width = $("A.site_link").eq(intIndex).width();
		 		parent_width 	= $("A.site_link").eq(intIndex).parent().width();
		 
		 		link_text = this.innerHTML;
		 		link_href = $(this).attr('href');
		 	
		 		$("A.site_link").eq(intIndex).after('<a href="' + link_href +'" class="site_link"><span><div></div>' + link_text + '</span></a>').remove(); 		 		
		 		
		 		
		 		// modify parent width
		 		parent_width = parent_width - 40; 
		 		
		 		if($.browser.msie && $.browser.version=="6.0"){
					$("A.site_link").eq(intIndex).css('margin-left', parseInt( (parent_width - this_link_width) / 2) / 2 );					
				}
				else {
					$("A.site_link").eq(intIndex).css('margin-left', parseInt( (parent_width - this_link_width) / 2) );					
				}

		 
			}
	 
		);
		
	}
	
	
	
	function ReplaceHRtag(){
		
		$("HR").after('<div class="hr"><!----></div>').remove(); 
		
		$("<p></p>").remove();
		
	}
	
	
	function IE6_li_hover(){
		
		if($.browser.msie && $.browser.version=="6.0"){
			
			$("DIV#hp_column_2_featured_products UL LI").mouseover(function(){
			
				$(this).addClass('hover');
				
			}).mouseout(function(){
			
				$(this).removeClass('hover');				
				
			});
			
		}

		
	}
