<?php
function modChrome_block( $module, &$params, &$attribs ) {
$app	= JFactory::getApplication();
 if (isset( $attribs['headerLevel'] )){ 
 $headerLevel = $attribs['headerLevel'];
 } else {
$headerLevel = 3;
}
if($module->module=='mod_menu' && ($app->getTemplate(true)->params->get( $module->position) == Null || $app->getTemplate(true)->params->get( $module->position) == 'block' && $app->getTemplate(true)->params->get( $module->position . 'ms') == 'v_menu'))
{
echo '<div class="ttr_verticalmenu">';
echo '<div style="height:0px;width:0px;overflow:hidden;-webkit-margin-top-collapse: separate;"></div>';
echo '<div class="ttr_verticalmenu_header">';
echo '</div>';
echo $module->content; 
echo '</div>';
}
else if($module->module=='mod_menu' && ($app->getTemplate(true)->params->get( $module->position) == Null || $app->getTemplate(true)->params->get( $module->position) == 'block' && $app->getTemplate(true)->params->get( $module->position . 'ms') == 'h_menu'))
{
echo $module->content;
}
else if($module->module!='mod_menu' && ($app->getTemplate(true)->params->get( $module->position) == Null || $app->getTemplate(true)->params->get( $module->position) == 'block' )) {
if ($module->position=='left'):
echo '<div class="ttr_sidebar_left_padding">';
elseif ($module->position=='right'):
echo '<div class="ttr_sidebar_right_padding">';
endif;
echo '<div style="height:0px;width:0px;overflow:hidden;-webkit-margin-top-collapse: separate;"></div>';
if ($module->showtitle){
echo '<div class="ttr_block '.$params->get( 'moduleclass_sfx' ) .'">';
echo '<div style="height:0px;width:0px;overflow:hidden;-webkit-margin-top-collapse: separate;"></div>';
echo '<div class="ttr_block_header">';
$heading='h3';
$temp=$app->getTemplate(true)->params->get('heading_tag_block');
if($temp != Null)
$heading=$temp;
/*echo '<'.$heading. ' class="ttr_block_heading" style="font-size:'.$app->getTemplate(true)->params->get('block_heading_font_size').'px;color:'.$app->getTemplate(true)->params->get('block_heading_color').'">';
echo '<img src="';
echo JURI::base() . 'templates/' . $app->getTemplate().'/images/blockicon.png';
echo '" alt="blockicon"/>';*/
echo $module->title;
echo '</'.$heading.'>';
echo '</div>';
}
else {
echo '<div class="ttr_block '.$params->get( 'moduleclass_sfx' ) .'">';
echo '<div style="height:0px;width:0px;overflow:hidden;-webkit-margin-top-collapse: separate;"></div>';
echo '<div class="ttr_block_without_header">';
echo '</div>';
}
echo '<div class="ttr_block_content">';
echo $module->content; 
echo '</div>';
echo '</div>';
echo '<div style="height:0px;width:0px;overflow:hidden;-webkit-margin-top-collapse: separate;"></div>';
if(($module->position=='left') || ($module->position=='right')):
echo '</div>';
endif;
}
}
?>
