// Javascript for FAQ's

// products
$( function() {
     
	if ( $(".productQ").length) {  
    $(".answer")
        .hide();
    
    $(".question").each( function() {
        $(this).html('<a href="#" class="closedExpand">' + $(this).html() + '</a>');
    });  
       
    $(".productQ .question a").click(function (){
        if( $(this).parent(".question").length ) {
            $(this).toggleClass("expand");
			$(this).parent().prev().toggleClass("expand");
		}
		$(this).parent().prev().css('z-index', 500);
		$(this).parent().css('z-index', 1000);
		$(this).parent().next().css('z-index', 100);
        $(this).parent().next().slideToggle('fast');
		return false;
      });
    }
    
});

// faqs
$( function() {
     
	if ( $(".freqAskedQ").length) {  
    $(".answer")
        .hide();
    
    $(".question").each( function() {
        $(this).html('<a href="#" class="closedExpand">' + $(this).html() + '</a>');
    });  
       
    $(".freqAskedQ .question a").click(function (){
        if( $(this).parent(".question").length )
            $(this).toggleClass("expand")
        $(this).parent().next().slideToggle();
        return false;
      });
    }
    
});

