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


/**
 * @package		Joomla Bamboo Zen Grid Framework
 * @Type        Core Framework Files - Manually loads the scripts for the zgf and JB extensions into the head of the index file.
 * @version		v1.1
 * @author		Joomlabamboo http://www.joomlabamboo.com
 * @copyright 	Copyright (C) 2007 - 2010 Joomla Bamboo
 * @license		http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
 */


// Variables
$superfishScriptDec ="";
$slideshowScriptDec ="";
$microblogScriptDec ="";
$slideScriptDec ="";
$jTweetScriptDec ="";
$jflickrScriptDec ="";
$jflickrFancyBoxScriptDec ="";
$captifyContentScriptDec ="";
$bambooboxScriptDec ="";
$minimoo2ScriptDec ="";
$minimoo2Easing ="";
$minimoo2Lightbox ="";
$prettyBoxScriptDec ="";
$prettySliderScriptDec ="";
$panelMenuScriptDec ="";
$tabScriptDec ="";
$hiddenpanelScriptDec ="";		
		

// Get the parameters from the modules
$slideshowparams = Yth::getModuleParams('slideshow3');
$microblogparams = Yth::getModuleParams('microblog');
$jtweetparams = Yth::getModuleParams('jTweet')
 

	// JB Extension Javascript

	// Microblog
 	if (Yth::hasModule('microblog')) {
	$microblogScriptDec = '<script type="text/JavaScript" src="'.$base.'/modules/mod_microblog/js/jquery.colorbox-min.js"></script>'; 
 	}



    // Slideshow Scripts
    if (Yth::hasModule('slideshow3')) {
    
    $SScycleType = $slideshowparams->get("ticker_transition");
     
    // Load Slideshow if only using
    if ($SScycleType == 'fade' && Yth::hasModule('slideshow3' )) $slideshowScriptDec = '<script type="text/JavaScript" src="'.$base.'/modules/mod_slideshow3/slideshow/jquery.cycle.lite.js"></script>';  
    
    // Load Slideshow if all transitions required
    if ($SScycleType !== 'fade' && Yth::hasModule('slideshow3' )) $slideshowScriptDec = '<script type="text/JavaScript" src="'.$base.'/modules/mod_slideshow3/slideshow/jquery.cycle.js"></script>'; 
    }
    
    
    
    // Load jTweet
    if (Yth::hasModule('jTweet')) {
  	
    $jTweetScriptDec ='<script type="text/JavaScript" src="'.$base.'/modules/mod_jTweet/js/jquery.tweet.js"></script>'; 
    
    }
    
    
     // JFlickr
    if (Yth::hasModule('jflickr')) {
    
    $jflickrScriptDec ='<script type="text/JavaScript" src="'.$base.'/modules/mod_jflickr/js/JFlickr.js"></script>';
    $jflickrparams = Yth::getModuleParams('jflickr');
    $jFlickrFancyBox = $jflickrparams->get("fancybox");

   	if ($jFlickrFancyBox =="yes") {
    if (($jflickrJS)&&(Yth::hasModule('jflickr'))) $jflickrFancyBoxScriptDec ='<script type="text/JavaScript" src="'.$base.'/modules/mod_jflickr/js/jquery.fancybox/jquery.fancybox-1.2.1.pack.js"></script><script type="text/JavaScript" src="'.$base.'/modules/mod_jflickr/js/jquery.easing.1.3.js"></script>';
   	}
    }
    
    
     // Minimoo2
    if (Yth::hasModule('minimoo2')) {
    $mmparams = Yth::getModuleParams('minimoo2');
    $mmLoadJS = $mmparams->get("mmJS");
    $mmTransition = $mmparams->get("transition");
    $mmLightbox = $mmparams->get("prettyPhoto");
    
    if ((Yth::hasModule('minimoo2')))  $minimoo2ScriptDec ='<script type="text/JavaScript" src="'.$base.'/modules/mod_minimoo2/js/jquery.flow.1.2.js"></script>';
    if (($mmTransition !=="swing" && Yth::hasModule('minimoo2'))) $minimoo2Easing ='<script type="text/JavaScript" src="'.$base.'/modules/mod_minimoo2/js/jquery.easing.min.js"></script>';
    if (($mmLightbox && Yth::hasModule('minimoo2'))) $minimoo2Lightbox ='<script type="text/JavaScript" src="'.$base.'/plugins/system/jbLibrary/prettyphoto/js/jquery.prettyPhoto.js"></script>';


    
    }
    
    // PrettyBox
    if (Yth::hasModule('prettyBox')) {
    $pbparams = Yth::getModuleParams('prettyBox');
    $pbLoadJS = $pbparams->get("pbJS");
    $pbLightbox = $pbparams->get("link");
    
   	if (($pbLightbox && Yth::hasModule('prettyBox'))) $prettyBoxScriptDec = '<script type="text/JavaScript" src="'.$base.'/plugins/system/jbLibrary/prettyphoto/js/jquery.prettyPhoto.js"></script>'; 
    
    }
    
   
    // Template JS
 	if ($extraJS) $extraJSDec = '<script type="text/JavaScript" src="'.$base.'/templates/'.$this->template.'/js/template.js"></script>';     

?>