<?php if (count($languages) > 1) { ?>

    <div id="language">
         <form action="<?php echo $action; ?>" method="post" enctype="multipart/form-data">
             <div>
                 <?php foreach ($languages as $language) { ?>
                       <a class="<?php echo ($language['code'] == $code ? 'selected_lang' : ''); ?>" onClick="$('input[name=\'code\']').attr('value', '<?php echo $language['code']; ?>').submit(); $(this).parent().parent().submit();">
                             <?php echo $language['code']; ?>
                       </a>
                 <?php } ?>
  			    <input type="hidden" name="code" value="" />
                <input type="hidden" name="redirect" value="<?php echo $redirect; ?>" />
             </div>
         </form>
	</div>
<?php } ?>



