// JavaScript Document

//<![CDATA[

//]]>


//jquery
$(document).ready(function(){ 
						   
/* Replacement calls. Please see documentation for more information. */

if(typeof sIFR == "function"){

// This is the preferred "named argument" syntax
	/**/sIFR.replaceElement(named({sSelector:"#pageHeading h1", sWmode:"transparent", sFlashSrc:"/assets/flash/flash_font/dax.swf", sColor:"#404041", sLinkColor:"#404041", sBgColor:"#e7e7e8", sHoverColor:"#404041", nPaddingTop:0, nPaddingBottom:12, sFlashVars:"textalign=left&offsetTop=0"}));
	sIFR.replaceElement(named({sSelector:"#leftCol h2", sWmode:"transparent", sFlashSrc:"/assets/flash/flash_font/dax.swf", sColor:"#F68423", sLinkColor:"#F68423", sBgColor:"#f5f5f6", sHoverColor:"#F68423", nPaddingTop:0, nPaddingBottom:10, sFlashVars:"textalign=left&offsetTop=0"}));
	sIFR.replaceElement(named({sSelector:".home #centerCol h2", sWmode:"transparent", sFlashSrc:"/assets/flash/flash_font/dax.swf", sColor:"#F68423", sLinkColor:"#F68423", sBgColor:"#f5f5f6", sHoverColor:"#F68423", nPaddingTop:0, nPaddingBottom:10, sFlashVars:"textalign=left&offsetTop=0"}));
	sIFR.replaceElement(named({sSelector:"#newsPanel h2", sWmode:"transparent", sFlashSrc:"/assets/flash/flash_font/dax.swf", sColor:"#F68423", sLinkColor:"#F68423", sBgColor:"#fefefe", sHoverColor:"#F68423", nPaddingTop:0, nPaddingBottom:10, sFlashVars:"textalign=left&offsetTop=0"}));
	sIFR.replaceElement(named({sSelector:"#pluginPanel h2", sWmode:"transparent", sFlashSrc:"/assets/flash/flash_font/dax.swf", sColor:"#FFFFFF", sLinkColor:"#FFFFFF", sBgColor:"#7d7c7c", sHoverColor:"#FFFFFF", nPaddingTop:2, nPaddingBottom:6, sFlashVars:"textalign=left&offsetTop=0"}));
	sIFR.replaceElement(named({sSelector:"#footer h2", sWmode:"transparent", sFlashSrc:"/assets/flash/flash_font/dax.swf", sColor:"#F68423", sLinkColor:"#F68423", sBgColor:"#f5f5f6", sHoverColor:"#F68423", nPaddingTop:0, nPaddingBottom:15, sFlashVars:"textalign=left&offsetTop=0"}));
	sIFR.replaceElement(named({sSelector:"#centerCol h1", sWmode:"transparent", sFlashSrc:"/assets/flash/flash_font/dax.swf", sColor:"#F68423", sLinkColor:"#F68423", sBgColor:"#f5f5f6", sHoverColor:"#F68423", nPaddingTop:0, nPaddingBottom:10, sFlashVars:"textalign=left&offsetTop=0"}));
};

						   
// set btn wrap
$("a span.darkBtn ").wrapInner(document.createElement("div"));

//adds span to list
$("#centerCol ul li").wrapInner(document.createElement("span"));

//render the correct css style on the main menu
$("#mainMenu ul#menuElem").addClass("sf-menu");

    
var preload = new Image();
preload.src = "../../images/submenuBG.gif";
	
jQuery('ul.sf-menu').superfish();
// Set menu function

$(function () {    // Tabs script
var tabContainers = $('div.tabs > div');   
     $('div.tabs ul.tabNavigation a').click(function () {     
	    tabContainers.hide().filter(this.hash).show();           
     $('div.tabs ul.tabNavigation a').removeClass('selected');   
	      $(this).addClass('selected');            
		      return false;  
			    }).filter(':first').click();});


//Flash Scripts
$('#flashPanel').flash({
    src: '/assets/flash/CadisMaster_Header-Flash_002.swf',
    width: 960,
    height: 220,
	wmode: 'transparent'
});
//Flash Scripts
$('#scroller').flash({
    src: '/assets/flash/pluginScroller_2.swf',
    width: 197,
    height: 125,
	wmode: 'transparent'
});
//Components Flash
$('#componentFlash').flash({
    src: '/assets/flash/CadisMaster_Components-Flash_001.swf',
    width: 475,
    height: 480,
	wmode: 'transparent'
});

//Bookmark sript
   // add a "rel" attrib if Opera 7+  
     if(window.opera) {  
         if ($("a.jqbookmark").attr("rel") != ""){ // don't overwrite the rel attrib if already set  
             $("a.jqbookmark").attr("rel","sidebar");  
         }  
     }  
   
     $("a.jqbookmark").click(function(event){  
         event.preventDefault(); // prevent the anchor tag from sending the user off to the link  
         var url = this.href;  
         var title = this.title;  
   
         if (window.sidebar) { // Mozilla Firefox Bookmark  
             window.sidebar.addPanel(title, url,"");  
         } else if( window.external ) { // IE Favorite  
             window.external.AddFavorite( url, title);  
         } else if(window.opera) { // Opera 7+  
             return false; // do nothing - the rel="sidebar" should do the trick  
         } else { // for Safari, Konq etc - browsers who do not support bookmarking scripts (that i could find anyway)  
              alert('Unfortunately, this browser does not support the requested action,'  
              + ' please bookmark this page manually.');  
         }  
   
     });  

////////////////////////////////////
});