<?php

// Copyright 2012 | Justin Throngard - Simple CMS Design | http://www.simplecmsdesign.com/
// Module native Joomla! 2.5 released under the GNU / GPL
//Do not remove the copyright from the code, thank you!

defined('_JEXEC') or die('Restricted access');
	$jquery   			= $params->get('jquery');		$orient  			= $params->get('orient');
#Module Parameter Settings
$document = & JFactory::getDocument();
	if ( $jquery > 0 ) {		if ($jquery == 1) {$document->addScript('http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js');}		if ($jquery == 2) {$document->addScript('http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js');}		if ($jquery == 3) {$document->addScript('http://ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.min.js');}		if ($jquery == 4) {$document->addScript('http://code.jquery.com/jquery-1.7.1.min.js');}		    		}		if ( $orient > 0 ) {		if ($orient == 1) {$document->addStyleSheet(JURI::base().'modules/mod_scd_fisheye_menu/css/dock-example1.css');							$document->addScript(JURI::base().'modules/mod_scd_fisheye_menu/js/fisheye-iutil.min.js');							$document->addScript(JURI::base().'modules/mod_scd_fisheye_menu/js/dock-example1.js');							}		if ($orient == 2) {$document->addStyleSheet(JURI::base().'modules/mod_scd_fisheye_menu/css/dock-example2.css');							$document->addScript(JURI::base().'modules/mod_scd_fisheye_menu/js/jquery.jqDock.min.js');							$document->addScript(JURI::base().'modules/mod_scd_fisheye_menu/js/dock.js');							}	    		}	
// Lets include all the params
  $moduleclass_sfx = $params->get( 'moduleclass_sfx' );
  $icon_container_margin_top = $params->get( 'icon_container_margin_top' );      //  $orig_width = $params->get( 'orig_width' );  //  $end_width = $params->get( 'end_width' );  
  $icon_title_color = $params->get( 'icon_title_color' );
  $icon_container_height = $params->get( 'icon_container_height' );
$icon1_status = $params->get('icon1_status');
$icon2_status = $params->get('icon2_status');
$icon3_status = $params->get('icon3_status');
$icon4_status = $params->get('icon4_status');
$icon5_status = $params->get('icon5_status');
$icon6_status = $params->get('icon6_status');
$icon7_status = $params->get('icon7_status');
$icon8_status = $params->get('icon8_status');
$icon9_status = $params->get('icon9_status');
$icon10_status = $params->get('icon10_status');
$link1 = $params->get('link1');
$link2 = $params->get('link2');
$link3 = $params->get('link3');
$link4 = $params->get('link4');
$link5 = $params->get('link5');
$link6 = $params->get('link6');
$link7 = $params->get('link7');
$link8 = $params->get('link8');
$link9 = $params->get('link9');
$link10 = $params->get('link10');
$image1 = $params->get('image1');
$image2 = $params->get('image2');
$image3 = $params->get('image3');
$image4 = $params->get('image4');
$image5 = $params->get('image5');
$image6 = $params->get('image6');
$image7 = $params->get('image7');
$image8 = $params->get('image8');
$image9 = $params->get('image9');
$image10 = $params->get('image10');
$alt_link1 = $params->get('alt_link1');
$alt_link2 = $params->get('alt_link2');
$alt_link3 = $params->get('alt_link3');
$alt_link4 = $params->get('alt_link4');
$alt_link5 = $params->get('alt_link5');
$alt_link6 = $params->get('alt_link6');
$alt_link7 = $params->get('alt_link7');
$alt_link8 = $params->get('alt_link8');
$alt_link9 = $params->get('alt_link9');
$alt_link10 = $params->get('alt_link10');
$text_link1 = $params->get('text_link1');
$text_link2 = $params->get('text_link2');
$text_link3 = $params->get('text_link3');
$text_link4 = $params->get('text_link4');
$text_link5 = $params->get('text_link5');
$text_link6 = $params->get('text_link6');
$text_link7 = $params->get('text_link7');
$text_link8 = $params->get('text_link8');
$text_link9 = $params->get('text_link9');
$text_link10 = $params->get('text_link10');
$backlink = $params->get('backlink');
  $user 	= JFactory::getUser();
  $acl 		= JFactory::getACL();
  $document = JFactory::getDocument();
    $siteLoc 		= JURI::base().'modules/mod_scd_fisheye_menu';

#Code Start

$content = "<div align='center'>";
?>
<!--[if IE 7]>
 <style type="text/css">
 div, img { behavior: url(modules/mod_scd_fisheye_menu/png_fix/iepngfix.htc) }
 </style>
<![endif]--><?php if ($orient == 1) { ?>
<div class="dock" id="dock"  style="margin-top: <?php echo $icon_container_margin_top;?>; height: <?php echo $icon_container_height;?>;" ><div class="dock-container">

  <?php if ($icon1_status == 1) { ?>  <a class="dock-item" style="color:<?php echo $icon_title_color;?>;"  style="color:<?php echo $icon_title_color;?>;" href="<?php echo $link1; ?>"><img src="modules/mod_scd_fisheye_menu/images/<?php echo $image1; ?>" alt="<?php echo $alt_link1; ?>" title="<?php echo $text_link1; ?>" /><span><?php echo $text_link1; ?></span></a>   <?php } ?>
  <?php if (($icon1_status == 2)&&($user->get('id'))){ ?> <a class="dock-item" style="color:<?php echo $icon_title_color;?>;"  href="<?php echo $link1; ?>"><img src="modules/mod_scd_fisheye_menu/images/<?php echo $image1; ?>" alt="<?php echo $alt_link1; ?>" title="<?php echo $text_link1; ?>" /><span><?php echo $text_link1; ?></span></a>   <?php } ?>
  <?php if ($icon1_status == 0) { ?>  <div style="display: none;"></div>   <?php } ?>
  <?php if ($icon2_status == 1) { ?>  <a class="dock-item" style="color:<?php echo $icon_title_color;?>;"  href="<?php echo $link2; ?>"><img src="modules/mod_scd_fisheye_menu/images/<?php echo $image2; ?>" alt="<?php echo $alt_link2; ?>" title="<?php echo $text_link2; ?>" /><span><?php echo $text_link2; ?></span></a>   <?php } ?>
  <?php if (($icon2__status == 2)&&($user->get('id'))){ ?><a class="dock-item" style="color:<?php echo $icon_title_color;?>;"  href="<?php echo $link2; ?>"><img src="modules/mod_scd_fisheye_menu/images/<?php echo $image2; ?>" alt="<?php echo $alt_link2; ?>" title="<?php echo $text_link2; ?>" /><span><?php echo $text_link2; ?></span></a>   <?php } ?>
  <?php if ($icon2_status == 0) { ?>  <div style="display: none;"></div>   <?php } ?>
  <?php if ($icon3_status == 1) { ?> <a class="dock-item" style="color:<?php echo $icon_title_color;?>;"  href="<?php echo $link3; ?>"><img src="modules/mod_scd_fisheye_menu/images/<?php echo $image3; ?>" alt="<?php echo $alt_link3; ?>" title="<?php echo $text_link3; ?>" /><span><?php echo $text_link3; ?></span></a>   <?php } ?>
  <?php if (($icon3_status == 2)&&($user->get('id'))){ ?> <a class="dock-item" style="color:<?php echo $icon_title_color;?>;"  href="<?php echo $link3; ?>"><img src="modules/mod_scd_fisheye_menu/images/<?php echo $image3; ?>" alt="<?php echo $alt_link3; ?>" title="<?php echo $text_link3; ?>' /><span><?php echo $text_link3; ?></span></a>   <?php } ?>
  <?php if ($icon3_status == 0) { ?>  <div style="display: none;"></div>   <?php } ?>
  <?php if ($icon4_status == 1) { ?>  <a class="dock-item" style="color:<?php echo $icon_title_color;?>;"  href="<?php echo $link4; ?>"><img src="modules/mod_scd_fisheye_menu/images/<?php echo $image4; ?>" alt="<?php echo $alt_link4; ?>" title="<?php echo $text_link4; ?>" /><span><?php echo $text_link4; ?></span></a>   <?php } ?>
  <?php if (($icon4_status == 2)&&($user->get('id'))){ ?> <a class="dock-item" style="color:<?php echo $icon_title_color;?>;"  href="<?php echo $link4; ?>"><img src="modules/mod_scd_fisheye_menu/images/<?php echo $image4; ?>" alt="<?php echo $alt_link4; ?>" title="<?php echo $text_link4; ?>" /><span><?php echo $text_link4; ?></span></a>   <?php } ?>
  <?php if ($icon4_status == 0) { ?>  <div style="display: none;"></div>   <?php } ?>
  <?php if ($icon5_status == 1) { ?>  <a class="dock-item" style="color:<?php echo $icon_title_color;?>;"  href="<?php echo $link5; ?>"><img src="modules/mod_scd_fisheye_menu/images/<?php echo $image5; ?>" alt="<?php echo $alt_link5; ?>" title="<?php echo $text_link5; ?>" /><span><?php echo $text_link5; ?></span></a>   <?php } ?>
  <?php if (($icon5_status == 2)&&($user->get('id'))){ ?> <a class="dock-item" style="color:<?php echo $icon_title_color;?>;"  href="<?php echo $link5; ?>"><img src="modules/mod_scd_fisheye_menu/images/<?php echo $image5; ?>" alt="<?php echo $alt_link5; ?>" title="<?php echo $text_link5; ?>" /><span><?php echo $text_link5; ?></span></a>   <?php } ?>
  <?php if ($icon5_status == 0) { ?>  <div style="display: none;"></div>   <?php } ?>
  <?php if ($icon6_status == 1) { ?>  <a class="dock-item" style="color:<?php echo $icon_title_color;?>;"  href="<?php echo $link6; ?>"><img src="modules/mod_scd_fisheye_menu/images/<?php echo $image6; ?>" alt="<?php echo $alt_link6; ?>" title="<?php echo $text_link6; ?>" /><span><?php echo $text_link6; ?></span></a>   <?php } ?>
  <?php if (($icon6_status == 2)&&($user->get('id'))){ ?> <a class="dock-item" style="color:<?php echo $icon_title_color;?>;"  href="<?php echo $link6; ?>"><img src="modules/mod_scd_fisheye_menu/images/<?php echo $image6; ?>" alt="<?php echo $alt_link6; ?>" title="<?php echo $text_link6; ?>" /><span><?php echo $text_link6; ?></span></a>   <?php } ?>
  <?php if ($icon6_status == 0) { ?>  <div style="display: none;"></div>   <?php } ?>
  <?php if ($icon7_status == 1) { ?>  <a class="dock-item" style="color:<?php echo $icon_title_color;?>;"  href="<?php echo $link7; ?>"><img src="modules/mod_scd_fisheye_menu/images/<?php echo $image7; ?>" alt="<?php echo $alt_link7; ?>" title="<?php echo $text_link7; ?>" /><span><?php echo $text_link7; ?></span></a>   <?php } ?>
  <?php if (($icon7_status == 2)&&($user->get('id'))){ ?> <a class="dock-item" style="color:<?php echo $icon_title_color;?>;"  href="<?php echo $link7; ?>"><img src="modules/mod_scd_fisheye_menu/images/<?php echo $image7; ?>" alt="<?php echo $alt_link7; ?>" title="<?php echo $text_link7; ?>" /><span><?php echo $text_link7; ?></span></a>   <?php } ?>
  <?php if ($icon7_status == 0) { ?>  <div style="display: none;"></div>   <?php } ?>
  <?php if ($icon8_status == 1) { ?>  <a class="dock-item" style="color:<?php echo $icon_title_color;?>;"  href="<?php echo $link8; ?>"><img src="modules/mod_scd_fisheye_menu/images/<?php echo $image8; ?>" alt="<?php echo $alt_link8; ?>" title="<?php echo $text_link8; ?>" /><span><?php echo $text_link8; ?></span></a>   <?php } ?>
  <?php if (($icon8_status == 2)&&($user->get('id'))){ ?> <a class="dock-item" style="color:<?php echo $icon_title_color;?>;"  href="<?php echo $link8; ?>"><img src="modules/mod_scd_fisheye_menu/images/<?php echo $image8; ?>" alt="<?php echo $alt_link8; ?>" title="<?php echo $text_link8; ?>" /><span><?php echo $text_link8; ?></span></a>   <?php } ?>
  <?php if ($icon8_status == 0) { ?>  <div style="display: none;"></div>   <?php } ?>
   <?php if ($icon9_status == 1) { ?>  <a class="dock-item" style="color:<?php echo $icon_title_color;?>;"  href="<?php echo $link9; ?>"><img src="modules/mod_scd_fisheye_menu/images/<?php echo $image9; ?>" alt="<?php echo $alt_link9; ?>" title="<?php echo $text_link9; ?>" /><span><?php echo $text_link9; ?></span></a>   <?php } ?>
  <?php if (($icon9_status == 2)&&($user->get('id'))){ ?> <a class="dock-item" style="color:<?php echo $icon_title_color;?>;"  href="<?php echo $link9; ?>"><img src="modules/mod_scd_fisheye_menu/images/<?php echo $image9; ?>" alt="<?php echo $alt_link9; ?>" title="<?php echo $text_link9; ?>" /><span><?php echo $text_link9; ?></span></a>   <?php } ?>
  <?php if ($icon9_status == 0) { ?>  <div style="display: none;"></div>   <?php } ?>
   <?php if ($icon10_status == 1) { ?>  <a class="dock-item" style="color:<?php echo $icon_title_color;?>;"  href="<?php echo $link10; ?>"><img src="modules/mod_scd_fisheye_menu/images/<?php echo $image10; ?>" alt="<?php echo $alt_link10; ?>" title="<?php echo $text_link10; ?>" /><span><?php echo $text_link10; ?></span></a>   <?php } ?>
  <?php if (($icon10_status == 2)&&($user->get('id'))){ ?> <a class="dock-item" style="color:<?php echo $icon_title_color;?>;"  href="<?php echo $link10; ?>"><img src="modules/mod_scd_fisheye_menu/images/<?php echo $image10; ?>" alt="<?php echo $alt_link10; ?>" title="<?php echo $text_link10; ?>" /><span><?php echo $text_link10; ?></span></a>   <?php } ?>
  <?php if ($icon10_status == 0) { ?>  <div style="display: none;"></div>   <?php } ?></div>
</div>   <?php if ($backlink == 1) { ?>  <div id="backlink"><a title="Boise Web Design" href="http://www.simplecmsdesign.com/" >SCD</a></div>  <?php } ?></div>
<?php } ?>
<?php if ($orient == 2) { ?><div class="dock" id="dock"  style="color:<?php echo $icon_title_color;?>; margin-top: <?php echo $icon_container_margin_top;?>; height: <?php echo $icon_container_height;?>;" ><div id="dockContainer">		<ul id="jqDock">  <?php if ($icon1_status == 1) { ?>  <li><a class="dockItem" href="<?php echo $link1; ?>"><img src="modules/mod_scd_fisheye_menu/images/<?php echo $image1; ?>" alt="<?php echo $alt_link1; ?>" title="<?php echo $text_link1; ?>" /></a></li>   <?php } ?>  <?php if (($icon1_status == 2)&&($user->get('id'))){ ?> <li><a class="dockItem" href="<?php echo $link1; ?>"><img src="modules/mod_scd_fisheye_menu/images/<?php echo $image1; ?>" alt="<?php echo $alt_link1; ?>" title="<?php echo $text_link1; ?>" /></a></li>   <?php } ?>  <?php if ($icon1_status == 0) { ?>  <div style="display: none;"></div>   <?php } ?>  <?php if ($icon2_status == 1) { ?>  <li><a class="dockItem" href="<?php echo $link2; ?>"><img src="modules/mod_scd_fisheye_menu/images/<?php echo $image2; ?>" alt="<?php echo $alt_link2; ?>" title="<?php echo $text_link2; ?>" /></a></li>   <?php } ?>  <?php if (($icon2__status == 2)&&($user->get('id'))){ ?><li><a class="dockItem" href="<?php echo $link2; ?>"><img src="modules/mod_scd_fisheye_menu/images/<?php echo $image2; ?>" alt="<?php echo $alt_link2; ?>" title="<?php echo $text_link2; ?>" /></a></li>   <?php } ?>  <?php if ($icon2_status == 0) { ?>  <div style="display: none;"></div>   <?php } ?>  <?php if ($icon3_status == 1) { ?> <li><a class="dockItem" href="<?php echo $link3; ?>"><img src="modules/mod_scd_fisheye_menu/images/<?php echo $image3; ?>" alt="<?php echo $alt_link3; ?>" title="<?php echo $text_link3; ?>" /></a></li>   <?php } ?>  <?php if (($icon3_status == 2)&&($user->get('id'))){ ?> <li><a class="dockItem" href="<?php echo $link3; ?>"><img src="modules/mod_scd_fisheye_menu/images/<?php echo $image3; ?>" alt="<?php echo $alt_link3; ?>" title="<?php echo $text_link3; ?>' /></a></li>   <?php } ?>  <?php if ($icon3_status == 0) { ?>  <div style="display: none;"></div>   <?php } ?>  <?php if ($icon4_status == 1) { ?>  <li><a class="dockItem" href="<?php echo $link4; ?>"><img src="modules/mod_scd_fisheye_menu/images/<?php echo $image4; ?>" alt="<?php echo $alt_link4; ?>" title="<?php echo $text_link4; ?>" /></a></li>   <?php } ?>  <?php if (($icon4_status == 2)&&($user->get('id'))){ ?> <li><a class="dockItem" href="<?php echo $link4; ?>"><img src="modules/mod_scd_fisheye_menu/images/<?php echo $image4; ?>" alt="<?php echo $alt_link4; ?>" title="<?php echo $text_link4; ?>" /></a></li>   <?php } ?>  <?php if ($icon4_status == 0) { ?>  <div style="display: none;"></div>   <?php } ?>  <?php if ($icon5_status == 1) { ?>  <li><a class="dockItem" href="<?php echo $link5; ?>"><img src="modules/mod_scd_fisheye_menu/images/<?php echo $image5; ?>" alt="<?php echo $alt_link5; ?>" title="<?php echo $text_link5; ?>" /></a></li>   <?php } ?>  <?php if (($icon5_status == 2)&&($user->get('id'))){ ?> <li><a class="dockItem" href="<?php echo $link5; ?>"><img src="modules/mod_scd_fisheye_menu/images/<?php echo $image5; ?>" alt="<?php echo $alt_link5; ?>" title="<?php echo $text_link5; ?>" /></a></li>   <?php } ?>  <?php if ($icon5_status == 0) { ?>  <div style="display: none;"></div>   <?php } ?>  <?php if ($icon6_status == 1) { ?>  <li><a class="dockItem" href="<?php echo $link6; ?>"><img src="modules/mod_scd_fisheye_menu/images/<?php echo $image6; ?>" alt="<?php echo $alt_link6; ?>" title="<?php echo $text_link6; ?>" /></a></li>   <?php } ?>  <?php if (($icon6_status == 2)&&($user->get('id'))){ ?> <li><a class="dockItem" href="<?php echo $link6; ?>"><img src="modules/mod_scd_fisheye_menu/images/<?php echo $image6; ?>" alt="<?php echo $alt_link6; ?>" title="<?php echo $text_link6; ?>" /></a></li>   <?php } ?>  <?php if ($icon6_status == 0) { ?>  <div style="display: none;"></div>   <?php } ?>  <?php if ($icon7_status == 1) { ?>  <li><a class="dockItem" href="<?php echo $link7; ?>"><img src="modules/mod_scd_fisheye_menu/images/<?php echo $image7; ?>" alt="<?php echo $alt_link7; ?>" title="<?php echo $text_link7; ?>" /></a></li>   <?php } ?>  <?php if (($icon7_status == 2)&&($user->get('id'))){ ?> <li><a class="dockItem" href="<?php echo $link7; ?>"><img src="modules/mod_scd_fisheye_menu/images/<?php echo $image7; ?>" alt="<?php echo $alt_link7; ?>" title="<?php echo $text_link7; ?>" /></a></li>   <?php } ?>  <?php if ($icon7_status == 0) { ?>  <div style="display: none;"></div>   <?php } ?>  <?php if ($icon8_status == 1) { ?>  <li><a class="dockItem" href="<?php echo $link8; ?>"><img src="modules/mod_scd_fisheye_menu/images/<?php echo $image8; ?>" alt="<?php echo $alt_link8; ?>" title="<?php echo $text_link8; ?>" /></a></li>   <?php } ?>  <?php if (($icon8_status == 2)&&($user->get('id'))){ ?> <li><a class="dockItem" href="<?php echo $link8; ?>"><img src="modules/mod_scd_fisheye_menu/images/<?php echo $image8; ?>" alt="<?php echo $alt_link8; ?>" title="<?php echo $text_link8; ?>" /></a></li>   <?php } ?>  <?php if ($icon8_status == 0) { ?>  <div style="display: none;"></div>   <?php } ?>   <?php if ($icon9_status == 1) { ?>  <li><a class="dockItem" href="<?php echo $link9; ?>"><img src="modules/mod_scd_fisheye_menu/images/<?php echo $image9; ?>" alt="<?php echo $alt_link9; ?>" title="<?php echo $text_link9; ?>" /></a></li>   <?php } ?>  <?php if (($icon9_status == 2)&&($user->get('id'))){ ?> <li><a class="dockItem" href="<?php echo $link9; ?>"><img src="modules/mod_scd_fisheye_menu/images/<?php echo $image9; ?>" alt="<?php echo $alt_link9; ?>" title="<?php echo $text_link9; ?>" /></a></li>   <?php } ?>  <?php if ($icon9_status == 0) { ?>  <div style="display: none;"></div>   <?php } ?>   <?php if ($icon10_status == 1) { ?>  <li><a class="dockItem" href="<?php echo $link10; ?>"><img src="modules/mod_scd_fisheye_menu/images/<?php echo $image10; ?>" alt="<?php echo $alt_link10; ?>" title="<?php echo $text_link10; ?>" /></a></li>   <?php } ?>  <?php if (($icon10_status == 2)&&($user->get('id'))){ ?> <li><a class="dockItem" href="<?php echo $link10; ?>"><img src="modules/mod_scd_fisheye_menu/images/<?php echo $image10; ?>" alt="<?php echo $alt_link10; ?>" title="<?php echo $text_link10; ?>" /></a></li>   <?php } ?>  <?php if ($icon10_status == 0) { ?>  <div style="display: none;"></div>   <?php } ?>  </ul>   <?php if ($backlink == 1) { ?>  <div id="backlink"><a title="Boise Web Design" href="http://www.simplecmsdesign.com/" ><img src="modules/mod_scd_fisheye_menu/images/scd_icon_36x36.png" alt="Boise Web Design"  title="Mobile and Joomla Web Design" /></a></div>  <?php } ?></div></div></div><?php } ?>
