<?php
// no direct access
defined( '_JEXEC' ) or die( 'Restricted index access' );
define( 'YOURBASEPATH', dirname(__FILE__) );
require( YOURBASEPATH.DS."rt_styleswitcher.php");
JHTML::_( 'behavior.mootools' );
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $this->language; ?>" lang="<?php echo $this->language; ?>" >
<head>
<jdoc:include type="head" />
<?php
	$live_site        					= $mainframe->getCfg('live_site');
	$default_style    					= $this->params->get("defaultStyle", "style3");
	$template_width   					= $this->params->get("templateWidth", "950"); 
	$sidebar_width						= $this->params->get("sidebarWidth", "375");
	$sidebar_side     					= $this->params->get("sidebarSide", "left");
	$menu_name       	 				= $this->params->get("menuName", "mainmenu");
	$menu_type        					= $this->params->get("menuType", "moomenu");
	$splitmenu_col						= $this->params->get("splitmenuCol", "secondcol");
	$default_font     					= $this->params->get("defaultFont", "default");
	$show_breadcrumbs 					= ($this->params->get("showBreadcrumbs", 1)  == 0)?"false":"true";

	// moomenu options
	$moo_bgiframe     					= ($this->params->get("moo_bgiframe'","0") == 0)?"false":"true";
	$moo_delay       					= $this->params->get("moo_delay", "500");
	$moo_duration    					= $this->params->get("moo_duration", "400");
	$moo_fps          					= $this->params->get("moo_fps", "100");
	$moo_transition   					= $this->params->get("moo_transition", "Expo.easeOut");	

	// rokzoom options
	$enable_rokzoom   					= ($this->params->get("enableRokzoom", 1)  == 0)?"false":"true";
	$zoom_resize_duration     			= $this->params->get("zoom_resize_duration", "700");
	$zoom_opacity_duration     			= $this->params->get("zoom_opacity_duration", "500");
	$zoom_transition   			  		= $this->params->get("zoom_transition", "Cubic.easeOut");
	
	// module title for moduleslider
	$module_slider_height 				= $this->params->get("moduleSliderHeight", 200);
	$max_mods_per_row					= $this->params->get("maxModsPerRow", 3);
	$ms_title1							= $this->params->get("msTitle1", "Group 1 Tab");	
	$ms_title2							= $this->params->get("msTitle2", "Group 2 Tab");	
	$ms_title3							= $this->params->get("msTitle3", "Group 3 Tab");	
	$ms_title4							= $this->params->get("msTitle4", "Group 4 Tab");	
	$ms_title5							= $this->params->get("msTitle5", "Group 5 Tab");		
	$ms_module1							= $this->params->get("msModule1", "user10");		
	$ms_module2							= $this->params->get("msModule2", "user11");			
	$ms_module3							= $this->params->get("msModule3", "user12");			
	$ms_module4							= $this->params->get("msModule4", "user13");			
	$ms_module5							= $this->params->get("msModule5", "user14");

	require(YOURBASEPATH .DS."rt_styleloader.php");
	require(YOURBASEPATH .DS."rt_tabmodules.php");
	require(YOURBASEPATH .DS."rt_utils.php");

	
	?>
	<link rel="shortcut icon" href="<?php echo $this->baseurl; ?>/images/favicon.ico" />
	<?php if($mtype=="moomenu" or $mtype=="suckerfish") :?>
	<link href="<?php echo $this->baseurl; ?>/templates/<?php echo $this->template?>/css/rokmoomenu.css" rel="stylesheet" type="text/css" />
	<?php endif; ?>
	<link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/system/css/system.css" type="text/css" />
	<link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/system/css/general.css" type="text/css" />
	<link href="<?php echo $this->baseurl; ?>/templates/<?php echo $this->template?>/css/template.css" rel="stylesheet" type="text/css" />
	<link href="<?php echo $this->baseurl; ?>/templates/<?php echo $this->template?>/css/<?php echo $tstyle; ?>.css" rel="stylesheet" type="text/css" />
	<link href="<?php echo $this->baseurl; ?>/templates/<?php echo $this->template?>/css/rokslidestrip.css" rel="stylesheet" type="text/css" />
	<?php if($enable_rokzoom=="true") :?>
	<link href="<?php echo $this->baseurl; ?>/templates/<?php echo $this->template?>/rokzoom/rokzoom.css" rel="stylesheet" type="text/css" />
	<?php endif; ?>	
	<style type="text/css">
		div.wrapper { <?php echo $template_width; ?>padding:0;}
		td.sidebar { width: <?php echo $sidebar_width; ?>px;}
	</style>
	<?php if (rok_isIe7()) :?>
	<!--[if IE 7]>
	<link href="<?php echo $this->baseurl; ?>/templates/<?php echo $this->template?>/css/template_ie7.css" rel="stylesheet" type="text/css" />
	<![endif]-->	
	<?php endif; ?>
	<?php if (rok_isIe6()) :?>
	<!--[if lte IE 6]>
	<link href="<?php echo $this->baseurl; ?>/templates/<?php echo $this->template?>/css/template_ie6.css" rel="stylesheet" type="text/css" />
	<style type="text/css">
	img { behavior: url(<?php echo $this->baseurl; ?>/templates/<?php echo $this->template?>/css/iepngfix.htc); } 
	</style>
	<![endif]-->
	<?php endif; ?>	
	<?php if($enable_rokzoom=="true") :?>
	<script type="text/javascript" src="<?php echo $this->baseurl; ?>/templates/<?php echo $this->template?>/rokzoom/rokzoom.js"></script>
	<?php endif; ?>
	<?php if($mtype=="moomenu") :?>
	<script type="text/javascript" src="<?php echo $this->baseurl; ?>/templates/<?php echo $this->template?>/js/rokmoomenu.js"></script>
	<script type="text/javascript" src="<?php echo $this->baseurl; ?>/templates/<?php echo $this->template?>/js/mootools.bgiframe.js"></script>
	<script type="text/javascript">
	window.addEvent('domready', function() {
		new Rokmoomenu($E('ul.menu'), {
			bgiframe: <?php echo $moo_bgiframe; ?>,
			delay: <?php echo $moo_delay; ?>,
			animate: {
				props: ['opacity', 'width', 'height'],
				opts: {
					duration:<?php echo $moo_duration; ?>,
					fps: <?php echo $moo_fps; ?>,
					transition: Fx.Transitions.<?php echo $moo_transition; ?>
				}
			}
		});
	});
	</script>
	<?php endif; ?>	
	<?php if($mtype=="suckerfish" or $mtype=="splitmenu") :
		echo "<!--[if IE]>\n";		
		echo "<script type=\"text/javascript\" src=\"" . $this->baseurl . "/templates/" . $this->template . "/js/ie_suckerfish.js\"></script>\n";
		echo "<![endif]-->\n";
	endif; ?>	
	<?php if($enable_rokzoom=="true") :?>
	<script type="text/javascript">
		window.addEvent('load', function() {
			RokZoom.init({
				imageDir: '<?php echo $this->baseurl; ?>/templates/<?php echo $this->template?>/rokzoom/images/',
				resizeFX: {
					duration: <?php echo $zoom_resize_duration; ?>,
					transition: Fx.Transitions.<?php echo $zoom_transition; ?>,
					wait: true
				},
				opacityFX: {
					duration: <?php echo $zoom_opacity_duration; ?>,
					wait: false	
				}
			});
		});
	</script>
	<?php endif; ?>		
	</head>
	<body class="<?php echo $fontstyle; ?> <?php echo $tstyle; ?>">
		<!-- start overall frame -->
		<div id="overall-frame">
			<!-- begin wrapper -->
			<div class="wrapper">
				<!-- begin header -->
				<div id="header">
					<div id="header2">
						<div id="header3">
							<a href="<?php echo $this->baseurl;?>" class="nounder"><img src="<?php echo $this->baseurl;?>/images/blank.png" border="0" alt="" id="logo" /></a>
							<div id="banner">
								<jdoc:include type="modules" name="banner" style="none" />
							</div>
						</div>
					</div>
				</div>
				<div id="primary-nav">
					<div id="primary-nav2">
						<div id="primary-nav3">
							<div id="horiz-menu" class="<?php echo $mtype; ?>">
								<?php if($mtype != "module") :
									echo $mainnav;
								else: ?>
									<jdoc:include type="modules" name="toolbar" style="none" />
						    	<?php endif; ?>	
							</div>		
						</div>
					</div>
				</div>
				<!-- end header -->
				<?php if ($show_breadcrumbs == "true") : ?>
					<jdoc:include type="module" name="breadcrumbs" style="none" />
				<?php endif; ?>
				<!-- begin mainbody -->
				<div id="body">
					<table class="mainbody" border="0" cellspacing="0" cellpadding="0">
						<tr valign="top">
							<!-- when sidebar is on the left -->
							<?php if ($sidebar_side=="left" and ($this->countModules('inset') or $this->countModules('user1') 
							or $this->countModules('user2') or $this->countModules('user3') or ($subnav))) : ?>
							<td class="sidebar">
								<jdoc:include type="modules" name="inset" style="rounded" />
								<?php if ($this->countModules('user1') or $this->countModules('user2') or ($subnav)) : ?>
									<div id="sidemodules" class="spacer<?php echo $sidemod_width; ?>">
										<?php if ($this->countModules('user1') or ($subnav and $splitmenu_col=="firstcol")) : ?>
											<div class="block">
												<?php if($subnav and $splitmenu_col=="firstcol") : ?>
													<div id="sub-menu">
														<?php echo $subnav; ?>
													</div>
												<?php endif; ?>
												<jdoc:include type="modules" name="user1" style="rounded" />
											</div>
										<?php endif; ?>
										<?php if ($this->countModules('user2') or ($subnav and $splitmenu_col=="secondcol")) : ?>
											<div class="block">
												<?php if($subnav and $splitmenu_col=="secondcol") : ?>
													<div id="sub-menu">
														<?php echo $subnav; ?>
													</div>
												<?php endif; ?>
												<jdoc:include type="modules" name="user2" style="rounded" />
											</div>
										<?php endif; ?>
									</div>
								<?php endif; ?>
								<div class="clr"></div>
								<jdoc:include type="modules" name="user3" style="rounded" />
							</td>
							<?php endif; ?>
							<td class="maincol">
								<div id="maincol">
									<?php if ($this->countModules('user4') or $this->countModules('user5')) : ?>
										<div id="topmodules" class="spacer<?php echo $topmod_width; ?>">
											<?php if ($this->countModules('user4')) : ?>
												<div class="block">
													<jdoc:include type="modules" name="user4" style="rounded" />
												</div>
											<?php endif; ?>
											<?php if ($this->countModules('user5')) : ?>
												<div class="block">
													<jdoc:include type="modules" name="user5" style="rounded" />
												</div>
											<?php endif; ?>
										</div>
									<?php endif; ?>
									<div id="component-top"><div><div></div></div></div>
									<div id="component"><div class="left"><div class="right">
										<div id="component-size">
											<jdoc:include type="message" />
											<jdoc:include type="component" />
										</div>
									</div></div></div>
									<div id="component-bottom"><div><div></div></div></div>
									<div class="clr"></div>
									<?php if ($this->countModules('user6') or $this->countModules('user7')) : ?>
										<div id="middlemodules" class="spacer<?php echo $middlemod_width; ?>">
											<?php if ($this->countModules('user6')) : ?>
												<div class="block">
													<jdoc:include type="modules" name="user6" style="rounded" />
												</div>
											<?php endif; ?>
											<?php if ($this->countModules('user7')) : ?>
												<div class="block">
													<jdoc:include type="modules" name="user7" style="rounded" />
												</div>
											<?php endif; ?>
										</div>
									<?php endif; ?>
									<div class="clr"></div>
									<?php if ($this->countModules('user8') or $this->countModules('user9')) : ?>
										<div id="bottommodules" class="spacer<?php echo $bottommod_width; ?>">
											<?php if ($this->countModules('user8')) : ?>
												<div class="block">
													<jdoc:include type="modules" name="user8" style="rounded" />
												</div>
											<?php endif; ?>
											<?php if ($this->countModules('user9')) : ?>
												<div class="block">
													<jdoc:include type="modules" name="user9" style="rounded" />
												</div>
											<?php endif; ?>
										</div>
									<?php endif; ?>
									<?php displayTabs($this); ?>
								</div>
							</td>
							<!-- when sidebar is on the right -->
							<?php if ($sidebar_side=="right" and ($this->countModules('inset') or $this->countModules('user1') 
							or $this->countModules('user2') or $this->countModules('user3') or ($subnav))) : ?>
							<td class="sidebar">
								<jdoc:include type="modules" name="inset" style="rounded" />
								<?php if ($this->countModules('user1') or $this->countModules('user2') or ($subnav)) : ?>
									<div id="sidemodules" class="spacer<?php echo $sidemod_width; ?>">
										<?php if ($this->countModules('user1') or ($subnav and $splitmenu_col=="firstcol")) : ?>
											<div class="block">
												<?php if($subnav and $splitmenu_col=="firstcol") : ?>
													<div id="sub-menu">
														<?php echo $subnav; ?>
													</div>
												<?php endif; ?>
												<jdoc:include type="modules" name="user1" style="rounded" />
											</div>
										<?php endif; ?>
										<?php if ($this->countModules('user2') or ($subnav and $splitmenu_col=="secondcol")) : ?>
											<div class="block">
												<?php if($subnav and $splitmenu_col=="secondcol") : ?>
													<div id="sub-menu">
														<?php echo $subnav; ?>
													</div>
												<?php endif; ?>
												<jdoc:include type="modules" name="user2" style="rounded" />
											</div>
										<?php endif; ?>
									</div>
								<?php endif; ?>
								<div class="clr"></div>
								<jdoc:include type="modules" name="user3" style="rounded" />
							</td>
							<?php endif; ?>
						</tr>
					</table>	
				</div>

				<!-- end mainbody -->
				<!-- begin footer panel -->
				<?php if ($this->countModules('user15') or $this->countModules('user16') or $this->countModules('user17')) : ?>
				<div id="footer-pad">
					<div id="footer-top"><div><div></div></div></div>
					<div id="footer"><div class="left"><div class="right">
							<div id="footermodules" class="spacer<?php echo $footermod_width; ?>">
								<?php if ($this->countModules('user15')) : ?>
									<div class="block">
										<jdoc:include type="modules" name="user15" style="rounded" />
									</div>
								<?php endif; ?>
								<?php if ($this->countModules('user16')) : ?>
									<div class="block">
										<jdoc:include type="modules" name="user16" style="rounded" />
									</div>
								<?php endif; ?>
								<?php if ($this->countModules('user17')) : ?>
									<div class="block">
										<jdoc:include type="modules" name="user17" style="rounded" />
									</div>
								<?php endif; ?>
							</div>
					</div></div></div>
					<div id="footer-bottom"><div><div></div></div></div>
				</div>
				<?php endif; ?>
				<!-- end footer panel -->
				<!-- start under area -->
				<div id="under">
					<div id="under2">
						<div id="under3">
							<div align="center">
								<!--  <a href="http://www.rockettheme.com/" title="RocketTheme Joomla Template Club" class="nounder"><img src="<?php echo $this->baseurl;?>/templates/<?php echo $this->template; ?>/images/blank.gif" border="0" alt="RocketTheme Joomla Templates" id="rocket" /></a><br />   -->
								<jdoc:include type="modules" name="footer" style="none" />
							</div>
						</div>
					</div>
				</div>
				<!-- end under area -->
				<!-- end body panel -->
			</div>
			<!-- end wrapper -->
		</div>
		<!-- end overall frame -->
		<jdoc:include type="modules" name="debug" style="none" />
	</body>	
</html>