<?php
defined( '_JEXEC' ) or die( 'Restricted index access' );
define( 'TEMPLATEPATH', dirname(__FILE__) );

/*
-----------------------------------------
Intrigue - Shape5.com Template Club
-----------------------------------------
Site:      www.shape5.com
Email:     contact@shape5.com
@license:  GNU General Public License version 2 or later; see LICENSE.txt
@copyright (C) 2010 Shape 5

*/

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $this->language; ?>" lang="<?php echo $this->language; ?>" dir="<?php echo $this->direction; ?>" >
	
	<head>
		<jdoc:include type="head" />
		<?php 	
			$s5_menu = $this->params->get ("xmls5menu");	
			$s5_right_width = $this->params->get ("xmls5rightwidth");
			$s5_left_width = $this->params->get ("xmls5leftwidth");   
			$s5_urlforSEO = $this->params->get ("xmls5seourl");
			
			if ($s5_urlforSEO  == ""){ 
			$LiveSiteUrl = JURI::root();}
			if ($s5_urlforSEO  != ""){ 
			$LiveSiteUrl = "$s5_urlforSEO/";}
			
			$app = JFactory::getApplication();
			
		if ($s5_menu == "yes")  {
		//		require( TEMPLATEPATH.DS."s5_suckerfish.php");
		//		$menu_name = $this->params->get ("xml_menuname");
			}
			
			$br = strtolower($_SERVER['HTTP_USER_AGENT']);
			$browser = "other";

			if(strrpos($br,"msie 7") > 1) {
			$browser = "ie7";} 

			if(strrpos($br,"msie 6") > 1) {
			$browser = "ie6";} 
			
			// Module size calculations

			if(!$this->countModules('right')) {
			$s5_right_width = "0";	
			}

			if(!$this->countModules('left')) {
			$s5_left_width = "0";	
			}
			
			if ($this->countModules("top") && $this->countModules("top2") && $this->countModules("top3") && $this->countModules("top4")) { $top_row="25%"; }
			else if (!$this->countModules("top") && $this->countModules("top2") && $this->countModules("top3") && $this->countModules("top4")) { $top_row="33.3%"; }
			else if ($this->countModules("top") && !$this->countModules("top2") && $this->countModules("top3") && $this->countModules("top4")) { $top_row="33.3%"; }
			else if ($this->countModules("top") && $this->countModules("top2") && !$this->countModules("top3") && $this->countModules("top4")) { $top_row="33.3%"; }
			else if ($this->countModules("top") && $this->countModules("top2") && $this->countModules("top3") && !$this->countModules("top4")) { $top_row="33.3%"; }
			else if (!$this->countModules("top") && !$this->countModules("top2") && $this->countModules("top3") && $this->countModules("top4")) { $top_row="50%"; }
			else if (!$this->countModules("top") && $this->countModules("top2") && !$this->countModules("top3") && $this->countModules("top4")) { $top_row="50%"; }
			else if (!$this->countModules("top") && $this->countModules("top2") && $this->countModules("top3") && !$this->countModules("top4")) { $top_row="50%"; }
			else if ($this->countModules("top") && !$this->countModules("top2") && !$this->countModules("top3") && $this->countModules("top4")) { $top_row="50%"; }
			else if ($this->countModules("top") && !$this->countModules("top2") && $this->countModules("top3") && !$this->countModules("top4")) { $top_row="50%"; }
			else if ($this->countModules("top") && $this->countModules("top2") && !$this->countModules("top3") && !$this->countModules("top4")) { $top_row="50%"; }
			else if (!$this->countModules("top") && !$this->countModules("top2") && !$this->countModules("top3") && $this->countModules("top4")) { $top_row="100%"; }
			else if (!$this->countModules("top") && $this->countModules("top2") && !$this->countModules("top3") && !$this->countModules("top4")) { $top_row="100%"; }
			else if (!$this->countModules("top") && !$this->countModules("top2") && $this->countModules("top3") && !$this->countModules("top4")) { $top_row="100%"; }
			else if ($this->countModules("top") && !$this->countModules("top2") && !$this->countModules("top3") && !$this->countModules("top4")) { $top_row="100%"; }
			
			if ($this->countModules("bottom") && $this->countModules("bottom2") && $this->countModules("bottom3") && $this->countModules("bottom4")) { $bot_row="25%"; }
			else if (!$this->countModules("bottom") && $this->countModules("bottom2") && $this->countModules("bottom3") && $this->countModules("bottom4")) { $bot_row="33.3%"; }
			else if ($this->countModules("bottom") && !$this->countModules("bottom2") && $this->countModules("bottom3") && $this->countModules("bottom4")) { $bot_row="33.3%"; }
			else if ($this->countModules("bottom") && $this->countModules("bottom2") && !$this->countModules("bottom3") && $this->countModules("bottom4")) { $bot_row="33.3%"; }
			else if ($this->countModules("bottom") && $this->countModules("bottom2") && $this->countModules("bottom3") && !$this->countModules("bottom4")) { $bot_row="33.3%"; }
			else if (!$this->countModules("bottom") && !$this->countModules("bottom2") && $this->countModules("bottom3") && $this->countModules("bottom4")) { $bot_row="50%"; }
			else if (!$this->countModules("bottom") && $this->countModules("bottom2") && !$this->countModules("bottom3") && $this->countModules("bottom4")) { $bot_row="50%"; }
			else if (!$this->countModules("bottom") && $this->countModules("bottom2") && $this->countModules("bottom3") && !$this->countModules("bottom4")) { $bot_row="50%"; }
			else if ($this->countModules("bottom") && !$this->countModules("bottom2") && !$this->countModules("bottom3") && $this->countModules("bottom4")) { $bot_row="50%"; }
			else if ($this->countModules("bottom") && !$this->countModules("bottom2") && $this->countModules("bottom3") && !$this->countModules("bottom4")) { $bot_row="50%"; }
			else if ($this->countModules("bottom") && $this->countModules("bottom2") && !$this->countModules("bottom3") && !$this->countModules("bottom4")) { $bot_row="50%"; }
			else if (!$this->countModules("bottom") && !$this->countModules("bottom2") && !$this->countModules("bottom3") && $this->countModules("bottom4")) { $bot_row="100%"; }
			else if (!$this->countModules("bottom") && $this->countModules("bottom2") && !$this->countModules("bottom3") && !$this->countModules("bottom4")) { $bot_row="100%"; }
			else if (!$this->countModules("bottom") && !$this->countModules("bottom2") && $this->countModules("bottom3") && !$this->countModules("bottom4")) { $bot_row="100%"; }
			else if ($this->countModules("bottom") && !$this->countModules("bottom2") && !$this->countModules("bottom3") && !$this->countModules("bottom4")) { $bot_row="100%"; }

			if ($this->countModules("bottom5") && $this->countModules("bottom6") && $this->countModules("bottom7") && $this->countModules("bottom8")) { $bot2_row="25%"; }
			else if (!$this->countModules("bottom5") && $this->countModules("bottom6") && $this->countModules("bottom7") && $this->countModules("bottom8")) { $bot2_row="33.3%"; }
			else if ($this->countModules("bottom5") && !$this->countModules("bottom6") && $this->countModules("bottom7") && $this->countModules("bottom8")) { $bot2_row="33.3%"; }
			else if ($this->countModules("bottom5") && $this->countModules("bottom6") && !$this->countModules("bottom7") && $this->countModules("bottom8")) { $bot2_row="33.3%"; }
			else if ($this->countModules("bottom5") && $this->countModules("bottom6") && $this->countModules("bottom7") && !$this->countModules("bottom8")) { $bot2_row="33.3%"; }
			else if (!$this->countModules("bottom5") && !$this->countModules("bottom6") && $this->countModules("bottom7") && $this->countModules("bottom8")) { $bot2_row="50%"; }
			else if (!$this->countModules("bottom5") && $this->countModules("bottom6") && !$this->countModules("bottom7") && $this->countModules("bottom8")) { $bot2_row="50%"; }
			else if (!$this->countModules("bottom5") && $this->countModules("bottom6") && $this->countModules("bottom7") && !$this->countModules("bottom8")) { $bot2_row="50%"; }
			else if ($this->countModules("bottom5") && !$this->countModules("bottom6") && !$this->countModules("bottom7") && $this->countModules("bottom8")) { $bot2_row="50%"; }
			else if ($this->countModules("bottom5") && !$this->countModules("bottom6") && $this->countModules("bottom7") && !$this->countModules("bottom8")) { $bot2_row="50%"; }
			else if ($this->countModules("bottom5") && $this->countModules("bottom6") && !$this->countModules("bottom7") && !$this->countModules("bottom8")) { $bot2_row="50%"; }
			else if (!$this->countModules("bottom5") && !$this->countModules("bottom6") && !$this->countModules("bottom7") && $this->countModules("bottom8")) { $bot2_row="100%"; }
			else if (!$this->countModules("bottom5") && $this->countModules("bottom6") && !$this->countModules("bottom7") && !$this->countModules("bottom8")) { $bot2_row="100%"; }
			else if (!$this->countModules("bottom5") && !$this->countModules("bottom6") && $this->countModules("bottom7") && !$this->countModules("bottom8")) { $bot2_row="100%"; }
			else if ($this->countModules("bottom5") && !$this->countModules("bottom6") && !$this->countModules("bottom7") && !$this->countModules("bottom8")) { $bot2_row="100%"; }
			
			if ($this->countModules("user1") && $this->countModules("user2")) { $user_1_2_row="48%"; }
			else if (!$this->countModules("user1") && $this->countModules("user2")) { $user_1_2_row="100%"; }
			else if ($this->countModules("user1") && !$this->countModules("user2")) { $user_1_2_row="100%"; }

		?>

		<meta http-equiv="Content-Type" content="text/html" />
		<meta http-equiv="Content-Style-Type" content="text/css" />
		<link rel="stylesheet" href="<?php echo $LiveSiteUrl ?>templates/system/css/system.css" type="text/css" />
		<link rel="stylesheet" href="<?php echo $LiveSiteUrl ?>templates/system/css/general.css" type="text/css" />
		<link rel="stylesheet" href="<?php echo $LiveSiteUrl ?>templates/shape5_intrigue/css/template.css" type="text/css" />
		<?php if($this->params->get ("xmls5menu") == "yes") { ?>
			<link href="<?php echo $LiveSiteUrl ?>templates/shape5_intrigue/css/s5_suckerfish.css" rel="stylesheet" type="text/css" />
			<?php if($this->params->get ("xmls5menu") == "yes" && ($browser == "ie7" || $browser == "ie6")) { ?>
				<script type="text/javascript" src="<?php echo $LiveSiteUrl ?>templates/shape5_intrigue/js/IEsuckerfish.js"></script>
			<?php } ?>
		<?php }?>
		<?php if($this->direction == "rtl") { ?>
			<link href="<?php echo $LiveSiteUrl ?>templates/shape5_intrigue/css/template_rtl.css" rel="stylesheet" type="text/css" />
		<?php } ?>
		
		<style type="text/css"> 
			#s5_header_wrap, #s5_highlight_row_1_wrap_outer, #s5_body_wrap, #s5_highlight_row_2_wrap_outer, #s5_footer_wrap {
			<?php if ($this->params->get ("xmls5fixedfluid") == "fluid") { ?>width:<?php echo $this->params->get ("xmls5bodywidth") ?>%;<?php } ?><?php if ($this->params->get ("xmls5fixedfluid") == "fixed") { ?>width:<?php echo $this->params->get ("xmls5bodywidth") ?>px;<?php } ?>}
			
			#s5_user4 .search, #s5_navv ul li.active, #s5_navv ul li:hover, #s5_navv ul ul {
			background-color:#<?php echo $this->params->get ("xmls5highlight"); ?>;}
			
			a:link, a:visited, .s5_mod_h3, .componentheading {
			color:#<?php echo $this->params->get ("xmls5highlight"); ?>;}
			.s5_highlight_row_1 {
			background-color:#<?php echo $this->params->get ("xmls5bg"); ?>;}
			
			<?php if(!$this->countModules('left') && !$this->countModules('right')) { ?>
			#s5_main_content_wrap_inner {
			margin-left:15px;
			margin-right:15px;}<?php } ?>
			
			<?php if(!$this->countModules('left') && $this->countModules('right')) { ?>
			#s5_main_content_wrap_inner {
			margin-left:15px;
			margin-right:<?php echo $s5_right_width + 30 ?>px;}
			#s5_right_wrap {
			margin-left:-<?php echo $s5_right_width + 15 ?>px;}<?php } ?>
			
			<?php if($this->countModules('left') && !$this->countModules('right')) { ?>
			#s5_main_content_wrap_inner {
			margin-left:<?php echo $s5_left_width + 30 ?>px;
			margin-right:15px;}	<?php } ?>

			<?php if($this->countModules('left') && $this->countModules('right')) { ?>
			#s5_main_content_wrap_inner {
			margin-left:<?php echo $s5_left_width + 30 ?>px;
			margin-right:<?php echo $s5_right_width + 30 ?>px;}
			#s5_right_wrap {
			margin-left:-<?php echo $s5_right_width + $s5_left_width + 30 ?>px;
			}<?php } ?>
			
			<?php if ($browser == "ie6" || $browser == "ie7") { ?>
			#s5_body_wrap, #s5_footer_wrap {
			margin-top:-44px;}<?php } ?>
			
			<?php if ($browser == "ie6") { ?>
			#s5_user4 .search {
			background:#<?php echo $this->params->get ("xmls5highlight"); ?>;
			filter:progid:dximagetransform.microsoft.alphaimageloader(src='<?php echo $LiveSiteUrl ?>templates/shape5_intrigue/images/s5_search.png', sizingmethod='crop');}
			
			#s5_navv ul li.active a, #s5_navv ul li.sfhover a {
			background-color:#<?php echo $this->params->get ("xmls5highlight"); ?>;
			color:#FFFFFF;
			}<?php } ?>
			
		</style>
		
			<?php if($browser == "ie6") { ?>
				<link href="<?php echo $LiveSiteUrl ?>templates/shape5_intrigue/css/ie6.css" rel="stylesheet" type="text/css" />
			<?php } ?>
	</head>

	<body id="s5_body">
	<div id="s5_outer_wrap">
	
		<div id="s5_header_wrap">
			<div id="s5_header_l">
				<div id="s5_header_r">
					<div id="s5_header_m">
						<div id="s5_logo" onclick="window.document.location.href='<?php echo $LiveSiteUrl ?>'"></div>
						<div id="s5_header_r_wrap">
							<div id="s5_search_rss_outer">
								<?php if ($this->params->get ("xmls5rss") == "yes") { ?>
									<div id="s5_rss" onclick="window.open('index.php?format=feed&amp;type=rss')"></div>
								<?php } ?>
								<?php if ($this->countModules("search")) { ?>
									<div id="s5_user4">
										<jdoc:include type="modules" name="search" style="no_title" />
									</div>
								<?php } ?>
							</div>
							<div style="clear:both"></div>
							<?php if ($this->countModules("suckerfish")) { ?>
								<div id="s5_menu">
									<div id="s5_navv">
										<jdoc:include type="modules" name="suckerfish" style="no_title" />	
										<script type="text/javascript" src="<?php echo $LiveSiteUrl ?>templates/shape5_intrigue/js/s5_menu_active_and_parent_links.js"></script>	
									</div>
								</div>
							<?php } ?>
						</div>
					</div>
				</div>
			</div>
		</div>
		
		<div class="s5_highlight_row_1">
			<div class="s5_highlight_row_2">
				<div class="s5_highlight_row_3">
					<div id="s5_highlight_row_1_wrap_outer">
						<div id="s5_highlight_row_1_wrap_inner">
							<?php if ($this->params->get ("xmls5tutorial") == "yes") { ?>
							<br/>
							<div style="float:left;width:31%;margin-right:17px;margin-left:13px;font-size:14pt;">
								<h1>Suckerfish Menu:</h1><br/>
								To enable this menu simply publish a menu module in your "site modules" area of Joomla to the "suckerfish" menu position.  If no drop downs appear enable "show sub menu items" in the menu mod.
							
							</div>
							<div style="float:left;width:31%;margin-right:17px;font-size:14pt;">
								<h1>Custom Widths:</h1><br/>
								Head on over to the "extensions > template manager" and select "shape5_intrigue" to define columns widths and other included template features. You can specify fixed or fluid, body width, left width and right width to any size!
							
							</div>
							<div style="float:left;width:31%;margin-right:17px;font-size:14pt;">
								<h1>Highlight/Background Color:</h1><br/>
								The custom highlight colors control backgrounds, titles, hyperlinks, menu items, suckerfish and several other elements. These colors can easily be set in the template configuration area.
							
							</div>
							
							<div class="clr"></div>
							<br/><br/>
							
							<?php } ?>
						
							<?php if ($this->countModules("top")) { ?>
								<div id="s5_top" style="width:<?php echo $top_row ?>">
									<jdoc:include type="modules" name="top" style="xhtml" />
								</div>
							<?php } ?>
							<?php if ($this->countModules("top2")) { ?>
								<div id="s5_top2" style="width:<?php echo $top_row ?>">
									<jdoc:include type="modules" name="top2" style="xhtml" />
								</div>
							<?php } ?>
							<?php if ($this->countModules("top3")) { ?>
								<div id="s5_top3" style="width:<?php echo $top_row ?>">
									<jdoc:include type="modules" name="top3" style="xhtml" />
								</div>
							<?php } ?>
							<?php if ($this->countModules("top4")) { ?>
								<div id="s5_top4" style="width:<?php echo $top_row ?>">
									<jdoc:include type="modules" name="top4" style="xhtml" />
								</div>
							<?php } ?>
							<div style="clear:both"></div>
						</div>
					</div>
				</div>
			</div>
		</div>
		
		<div id="s5_body_wrap">
			<div class="s5_tl">
				<div class="s5_tr">
					<div class="s5_tm">
					</div>
				</div>
			</div>
			<div class="s5_ml">
				<div class="s5_mr">
					<div class="s5_mm">
						<div id="s5_main_body_wrap_inner">
							<div id="s5_main_body_wrap_inner2">
					
								<div id="s5_main_content_wrap">
									<div id="s5_main_content_wrap_inner">	
										<div id="s5_component_wrap">
										
											<?php if($this->countModules('breadcrumb')) { ?>
												<div id="s5_pathway">
													<jdoc:include type="modules" name="breadcrumb" style="notitle" />
												</div>
											<?php } ?>
											
											<?php if ($this->countModules("user1") || $this->countModules("user2")) { ?>
												<div style="width:100%">
													<?php if ($this->countModules("user1")) { ?>
														<div id="s5_user1" style="width:<?php echo $user_1_2_row ?>">
															<jdoc:include type="modules" name="user1" style="round_box" />
														</div>
													<?php } ?>
													<?php if ($this->countModules("user2")) { ?>
														<div id="s5_user2" style="width:<?php echo $user_1_2_row ?>">
															<jdoc:include type="modules" name="user2" style="round_box" />
														</div>
													<?php } ?>
													<div style="clear:both"></div>
												</div>
											<?php } ?>
											
											<jdoc:include type="message" />
											<jdoc:include type="component" />
											
											<?php if($this->countModules('user3')) { ?>
												<div id="s5_user3">
													<jdoc:include type="modules" name="user3" style="round_box" />
												</div>
											<?php } ?>
											
										</div>
									</div>
								</div>
								
								<?php if($this->countModules('left')) { ?>
									<div id="s5_left_wrap" style="width:<?php echo $s5_left_width ?>px">
										<jdoc:include type="modules" name="left" style="round_box" />
									</div>
								<?php } ?>
								
								<?php if($this->countModules('right')) { ?>
									<div id="s5_right_wrap" style="width:<?php echo $s5_right_width ?>px">
										<jdoc:include type="modules" name="right" style="round_box" />
									</div>
								<?php } ?>
							
							</div>
							
						</div>
					</div>
				</div>
			</div>
			<div class="s5_bl">
				<div class="s5_br">
					<div class="s5_bm">
					</div>
				</div>
			</div>
		</div>
		
		<div class="s5_highlight_row_1">
			<div class="s5_highlight_row_2">
				<div class="s5_highlight_row_3">
					<div id="s5_highlight_row_2_wrap_outer">
						<div id="s5_highlight_row_2_wrap_inner">
							<?php if ($this->countModules("bottom")) { ?>
								<div id="s5_bottom" style="width:<?php echo $bot_row ?>">
									<jdoc:include type="modules" name="bottom" style="xhtml" />
								</div>
							<?php } ?>
							<?php if ($this->countModules("bottom2")) { ?>
								<div id="s5_bottom2" style="width:<?php echo $bot_row ?>">
									<jdoc:include type="modules" name="bottom2" style="xhtml" />
								</div>
							<?php } ?>
							<?php if ($this->countModules("bottom3")) { ?>
								<div id="s5_bottom3" style="width:<?php echo $bot_row ?>">
									<jdoc:include type="modules" name="bottom3" style="xhtml" />
								</div>
							<?php } ?>
							<?php if ($this->countModules("bottom4")) { ?>
								<div id="s5_bottom4" style="width:<?php echo $bot_row ?>">
									<jdoc:include type="modules" name="bottom4" style="xhtml" />
								</div>
							<?php } ?>
							<div style="clear:both"></div>
						</div>
					</div>
				</div>
			</div>
		</div>
		
		<div id="s5_footer_wrap">
			<?php if ($this->countModules("bottom5") || $this->countModules("bottom6") || $this->countModules("bottom7") || $this->countModules("bottom8")) { ?>
				<div id="s5_bot2_wrap">
					<div class="s5_tl">
						<div class="s5_tr">
							<div class="s5_tm">
							</div>
						</div>
					</div>
					<div class="s5_ml">
						<div class="s5_mr">
							<div class="s5_mm">
								<div id="s5_bot2_wrap_inner">
									<?php if ($this->countModules("bottom5")) { ?>
										<div id="s5_bottom5" style="width:<?php echo $bot2_row ?>">
											<jdoc:include type="modules" name="bottom5" style="round_box" />
										</div>
									<?php } ?>
									<?php if ($this->countModules("bottom6")) { ?>
										<div id="s5_bottom6" style="width:<?php echo $bot2_row ?>">
											<jdoc:include type="modules" name="bottom6" style="round_box" />
										</div>
									<?php } ?>
									<?php if ($this->countModules("bottom7")) { ?>
										<div id="s5_bottom7" style="width:<?php echo $bot2_row ?>">
											<jdoc:include type="modules" name="bottom7" style="round_box" />
										</div>
									<?php } ?>
									<?php if ($this->countModules("bottom8")) { ?>
										<div id="s5_bottom8" style="width:<?php echo $bot2_row ?>">
											<jdoc:include type="modules" name="bottom8" style="round_box" />
										</div>
									<?php } ?>
									<div style="clear:both"></div>
								</div>
							</div>
						</div>
					</div>
					<div class="s5_bl">
						<div class="s5_br">
							<div class="s5_bm">
							</div>
						</div>
					</div>
				</div>
			<?php } ?>
			
			<div class="s5_tl">
				<div class="s5_tr">
					<div class="s5_tm">
					</div>
				</div>
			</div>
			<div class="s5_ml">
				<div class="s5_mr">
					<div class="s5_mm">
						<div id="s5_footer_inner">
							<div id="s5_footer_text">
								<span class="footerc">
								Copyright &copy; <?php echo date('Y'); ?>  <?php echo $app->getCfg('sitename'); ?>
								Designed by Shape5.com <a href="http://www.shape5.com/" class="footerc" title="Visit Shape5.com Joomla Template Club" target="blank">Joomla Templates</a>
								</span>
							</div>
							<?php if($this->params->get ("xmls5validation") == "yes") { ?>
								<div id="s5_validation">
									<?php echo JText::_('Powered by') ?> <a href="http://www.joomla.org">Joomla!</a>. <?php echo JText::_('Valid') ?> <a href="http://validator.w3.org/check/referer">XHTML</a> <?php echo JText::_('and') ?> <a href="http://jigsaw.w3.org/css-validator/check/referer">CSS</a>.
								</div>
							<?php } ?>
							<div style="clear:both"></div>
						</div>
					</div>
				</div>
			</div>
			<div class="s5_bl">
				<div class="s5_br">
					<div class="s5_bm">
					</div>
				</div>
			</div>
		</div>
		
		<?php if ($browser == "ie6" || $browser == "ie7") { ?>
			
			<div style="height:1px"></div>

		<?php } ?>
		
		<?php if($this->countModules('debug')) { ?>
		<div style="color:#FFFFFF">
			<jdoc:include type="modules" name="debug" style="xhtml" />
		</div>
		<?php } ?>
		
	</div>
	</body>
	
</html>