<?php
/**
 * Joomla! 1.5 module JM TopPanle
 * @version 1.2
 * @author Matteo Nieddu by J!MatHome 
 * @link http://jmathome.mathome.com
 * @package mod_jm_toppanel
 * @copyright	Copyright (C) 2005 - 2009 Open Source Matters. All rights reserved.
 * @license http://www.gnu.org/licenses/gpl.html GNU Public License
 **/

// no direct access
defined('_JEXEC') or die('Restricted access');

// Include the syndicate functions only once
require_once (dirname(__FILE__).DS.'helper.php');

$jm_toppanel_idmodule = $params->get( 'jm_toppanel_idmodule' );
$jm_toppanel_module_height = $params->get('jm_toppanel_module_height');
$jm_toppanel_module_width = $params->get('jm_toppanel_module_width');
$jm_toppanel_module_position = $params->get('jm_toppanel_module_position');
$jm_toppanel_button_label = $params->get('jm_toppanel_button_label');
$jm_toppanel_button_position = $params->get('jm_toppanel_button_position');
$jm_toppanel_fx_duration = $params->get('jm_toppanel_fx_duration');
$jm_toppanel_animation = $params->get('jm_toppanel_animation');

$jm_module = modjmTopPanleHelper::getModule($params, $jm_toppanel_idmodule);

$jmscript = "<script type='text/javascript'>
window.addEvent('domready', function(){

	var mySlide = new Fx.Slide('jm_content_module-" . $module->id . "', {offset:$jm_toppanel_module_height, duration: $jm_toppanel_fx_duration, transition:$jm_toppanel_animation});
	mySlide.hide();
	
	$('jm_button-" . $module->id . "').addEvent('click', function(e) {
			e = new Event(e);
			mySlide.toggle();
			e.stop();
			
	});
	
});
</script>";

$docjm = & JFactory::getDocument();
$docjm->addStyleSheet(JURI::base() . "modules/mod_jm_toppanel/styles/style.css");

require(JModuleHelper::getLayoutPath('mod_jm_toppanel'));

