
<?php
/**
 * Language switcher template
 *
 * @see Mage_Page_Block_Switch
 */
?>
 

<?php if(count($this->getStores())>1): ?>
<div class="language-box">
  <div class="language-switcher">
   <div style="display: none;" class="language_detail">
          <div class="language-inner">
   <?php foreach ($this->getStores() as $_lang): ?>       
            <a href="<?php echo $_lang->getCurrentUrl();?>">
               <img src="<?php echo $this->getSkinUrl('images/flags/'.$this->htmlEscape($_lang->getCode()).'.png') ?>" alt="<?php echo $this->htmlEscape($_lang->getName()) ?>" />
               <span><?php echo $this->htmlEscape($_lang->getName()) ?></span>
            </a>          
   <?php endforeach;?>
</div>  <!--language-inner -->
  </div> <!--language_detail-->
  <div class="select_lang"> 
     <?php $storecode = Mage::app()->getStore()->getCode(); ?>
     <img src="<?php echo $this->getSkinUrl('images/flags/'.$storecode.'.png') ?>" alt="<?php echo $storecode; ?>"/> 
     <span><?php echo Mage::app()->getStore()->getName(); ?></span> <span class="caret"></span>
  </div> <!--select_lang-->
  </div> <!--language-switcher-->
</div> <!--language-box-->
<script type="text/javascript">
        jQuery(function() {
                jQuery(".language-switcher").hover(function() {
                        jQuery('.select_lang').addClass('active');
                        jQuery(".language_detail").stop(true, true).slideDown(200, "easeInSine");
                        },  
                        function() {
                        jQuery('.select_lang').removeClass('active');
                        jQuery(".language_detail").stop(true, true).fadeOut(100, "easeInCubic");
                        });

        });
</script>
<?php endif;?>



       


