<?php
  /**
   * F.A.Q.
   *
   * @package Digital Downloads Pro
   * @author wojoscripts.com
   * @copyright 2010
   * @version $Id: faq.php, v2.00 2011-07-10 10:12:05 gewa Exp $
   */
  if (!defined("_VALID_PHP"))
      die('. دسترسی مستقیم به این محل مجاز نمی باشد');
	  
  $faqrow = $content->getFaq();
?>
<!-- Start F.A.Q. -->
<?php if($faqrow):?>
<div id="faq" class="box2">
<a href="javascript:void(0);" class="expand">بـازکـردن همـه</a>
<div class="clear"></div>
<?php foreach($faqrow as $frow):?>
<div class="faq-wrap">
<p class="question"><a href="javascript:void(0);"><?php echo $frow['question'];?></a></p>
<div class="answer"><?php echo cleanOut($frow['answer']);?></div>
</div>
<?php endforeach;?>
<?php endif;?>
</div>
<script type="text/javascript">
// <![CDATA[
$(function () {
    $('p.question a').live('click', function () {
        var parent = $(this).parent().parent();
        var answer = parent.find('.answer');

        if (answer.is(':visible')) {
            answer.slideUp(100, function () {
                answer.hide();
            });
        } else {
            answer.fadeIn(300, function () {
                answer.show();
            });
        }
        return false;
    });

    $('a.expand').toggle(function () {
        $(this).text('Hide All');
        $('.answer').each(function () {
            $(this).slideDown(150, function () {
                $(this).show();
            });
        });
        return false;
    }, function () {
        $(this).text('Expand All');
        $('.answer').each(function () {
            $(this).slideUp(150, function () {
                $(this).hide();
            });
        });
        return false;
    });
});
// ]]>
</script> 
<!-- End F.A.Q./--> 