<?php
defined('_JEXEC') or die('Restricted access');

/*
 * used on the left/right modules
 */
function modChrome_icemodule($module, &$params, &$attribs)
{
	$headerLevel = isset($attribs['headerLevel']) ? (int) $attribs['headerLevel'] : 3;
	if (!empty ($module->content)) : ?>
		
        
        <div class="icemodule <?php echo $params->get('moduleclass_sfx'); ?>">

					<?php if ($module->showtitle) : ?>
                    
                    <h3>
						<?php
                                    $title = $module->title;
                                    $title = split(' ', $title);
                                    $title[0] = '<span>'.$title[0].'</span>';
                                    $title= join(' ', $title);
                                    echo $title; 
                                ?>
                        </h3>
                            
                    <?php endif; ?>
                    
                    <div class="icemodule_content"> 
					<?php echo $module->content; ?>
                    </div>
                    
           
        </div>
        
	<?php endif;
}

												
/*
 * used on the promo and bottom modules
 */
function modChrome_block($module, &$params, &$attribs)
{
	if (!empty ($module->content)) : ?>
		<div class="moduletable <?php echo $params->get('moduleclass_sfx'); ?>">
		
        	
		<?php if ($module->showtitle != 0) : ?>
		<div class="moduletable_r">
              	<div class="moduletable_l">
                                                
                    <h3>
                        <span class="icons"></span><?php $title = $module->title;
                            $title = split(' ', $title);
                            $title[0] = '<span>'.$title[0].'</span>';
                            $title= join(' ', $title);
                            echo $title; ?>
                     </h3>
                     
                     
     		   </div>
         </div>
		<?php endif; ?>
        	
             <div class="moduletable_content">
			 <?php echo $module->content; ?>
             </div>
         	
            
            
                
		</div>
	<?php endif;
}

/*
 * used on the footer modules
 */
function modChrome_block_footer($module, &$params, &$attribs)
{
	if (!empty ($module->content)) : ?>
		<div class="moduletable <?php echo $params->get('moduleclass_sfx'); ?>">
		
		<?php if ($module->showtitle != 0) : ?>
                <h3>
					<span class="icons"></span><?php $title = $module->title;
                        $title = split(' ', $title);
                        $title[0] = '<span>'.$title[0].'</span>';
                        $title= join(' ', $title);
                        echo $title; ?>
                 </h3>
		<?php endif; ?>
        	
             <div class="moduletable_content">
			 <?php echo $module->content; ?>
             </div>
            
		</div>
	<?php endif;
}




/*
 * used for the columns modules 
 */
function modChrome_colmodule ($module, &$params, &$attribs)
{
	if (!empty ($module->content)) : ?>
		<div class="col-module <?php echo $params->get('moduleclass_sfx'); ?>">
		
            <div><div><div><div>
            <div class="col-module_fix">                                      
           
                                                                    
                        <?php if ($module->showtitle != 0) : ?>
                              <h3>
                                <span class="col-module_header_r">
                                <span class="col-module_header_l">
                                <span class="col-module_header_arrow">
                                
                                <?php $title = $module->title;
                                    $title = split(' ', $title);
                                    $title[0] = '<span class="col-module_header_color">'.$title[0].'</span>';
                                    $title= join(' ', $title);
                                    echo $title; ?>
                           		</span>
                                </span>
                             	</span>  
                        	</h3>
                        <?php endif; ?>
                        
        	
                         <div class="col-module_content">
                         <?php echo $module->content; ?>
                         </div>
               
            </div></div></div></div>  
            </div>
				                              
		</div>
	<?php endif;
}


/*
 * used for the user modules on middle column
 */
function modChrome_usermodule ($module, &$params, &$attribs)
{
	if (!empty ($module->content)) : ?>
		<div class="usermodule <?php echo $params->get('moduleclass_sfx'); ?>">
			<div>
            	<div>
                	<div>
                    	<div>
		<?php if ($module->showtitle != 0) : ?>
                  <h3>
				<span class="icons"></span>	<?php $title = $module->title;
                        $title = split(' ', $title);
                        $title[0] = '<span>'.$title[0].'</span>';
                        $title= join(' ', $title);
                        echo $title; ?>
                 </h3>
		<?php endif; ?>
        	
			 <?php echo $module->content; ?>
        
       					</div>
                    </div>
                </div>
            </div>   
		</div>
	<?php endif;
}


?>
