  Cufon.replace('#header-message h2', { fontFamily: 'Meta Normal' });
  
  // Load Main Ad flash
 /*
  var flashvars = {};   
  var params = {};      
  params.menu = "false";      
  params.wmode = "opaque";    
  var attributes = {};    
  swfobject.embedSWF("/images/shiny3/advert/nov-promo.swf", "main-ad", "530", "360", "9.0.0", false, flashvars, params, attributes);     
 */
  // Load Daily Message flash
  /*
  var flashvars = {}; 
  var params = {};
  params.wmode = "window";
  params.allowfullscreen = "false";
  params.allowscriptaccess = "sameDomain";          
  var attributes = {};          
  swfobject.embedSWF("/external/dailymessages.swf", "header-message", "530", "30", "9.0.0", false, flashvars, params, attributes);  
  */
  // Load Supersaver FaceBook flash
/*  var flashvars = {};   
  var params = {};      
  params.menu = "false";      
  params.wmode = "opaque";    
  var attributes = {};    
  swfobject.embedSWF("/images/shiny3/sidebar/supersavers_fb.swf", "supersaver-fb", "200", "100", "9.0.0", false, flashvars, params, attributes);
*/

  // Load Routes & Schedules Map
  var flashvars = {};   
  var params = {};      
  params.menu = "false";      
  params.wmode = "opaque";    
  var attributes = {};    
  swfobject.embedSWF("/images/content/route-map.swf", "fy-route-map", "510", "238", "9.0.0", false, flashvars, params, attributes);

  var flashvars = {};   
  var params = {};      
  params.menu = "false";      
  params.wmode = "opaque";    
  var attributes = {};    
  swfobject.embedSWF("/images/content/route-map-big-NOJET.swf?20111205", "fy-route-map-big", "700", "572", "9.0.0", false, flashvars, params, attributes);

 
  $(function() { 
  	$('.tabs').tabs({ fx: { opacity: 'toggle' } });
  	$('.tabs-alt').tabs({ idPrefix: 'ui-tabs-alt' });
  	$(".accordion").accordion({ autoHeight: false });
  	$(".pop-insurance").colorbox({width:"660", height:"460", iframe:true}); 
  	$(".iframe-partner").colorbox({width:"520", height:"420", iframe:true}); 
  	$(".iframe-packages").colorbox({width:"480", height:"460", iframe:true});    
    $(".pop-vtours").colorbox({width:"100%", height:"100%", iframe:true});
    $(".pop-flights").colorbox({width:"500", height:"400", iframe:true});
  	$(".pop-photos").colorbox();
    $("#feedback-button a").colorbox({width:"480", height:"400", iframe:true, title:"Firefly Feedback Form"});
    $(".pop-flight-search").colorbox({width:"400", height:"360", iframe:true, title:"Firefly Flight Search"});
    $(".pop-route-map").colorbox({width:"750", height:"600", inline:true, title:"Firefly Route Map", href:"#fy-route-map-wrapper"});

  	$('#skyscraper').innerfade({ speed: 'slow', timeout: 10000, type: 'sequence', containerheight: '600' }); 
  	$('#halfskyscraper').innerfade({ speed: 'slow', timeout: 5000, type: 'sequence', containerheight: '320' }); 
//  	$('#main-ad').innerfade({ speed: 'slow', timeout: 10000, type: 'sequence', containerheight: '360' }); 
  	$('#side-ad1').innerfade({ speed: 'slow', timeout: 10000, type: 'sequence', containerheight: '178' }); 
  	$('#side-ad2').innerfade({ speed: 'slow', timeout: 10000, type: 'sequence', containerheight: '178' }); 
  	$('#side-banners').innerfade({ speed: 'slow', timeout: 10000, type: 'sequence', containerheight: '178' }); 
  	$('.promo-august2010 #main-ad-full').innerfade({ speed: 'slow', timeout: 10000, type: 'sequence', containerheight: '360' });

// Web Check-in
   $(".pop-web-check-in-demo").colorbox({width:"720", height:"100%", inline:true, title:"Firefly Web Check-in Demo", href:"#web-check-in-demo"});
  	$('#slideshow').innerfade({ speed: 'slow', timeout: 10000, type: 'sequence', containerheight: '600' });

  });
  $(document).ready(function(){
    $(".tabs a[href=#schedule]").bind('click', function(){
        location.href = "http://www.fireflyz.com.my/flights/routes-schedules";
    });  
  });
	
	$(window).load(function() {
	/*      	$("#slideshow").nivoSlider({
	      	  effect:'fade', //Specify sets like: 'fold,fade,sliceDown'
	          slices:15,
	          animSpeed:500,
	          pauseTime:5500,
	          startSlide:0, //Set starting Slide (0 index)
	          directionNav:true, //Next & Prev
	          directionNavHide:true, //Only show on hover
	          controlNav:true, //1,2,3...
	          controlNavThumbs:false, //Use thumbnails for Control Nav
	          controlNavThumbsFromRel:false, //Use image rel for thumbs
	          controlNavThumbsSearch: '.jpg', //Replace this with...
	          controlNavThumbsReplace: '_tn.jpg', //...this in thumb Image src
	          keyboardNav:true, //Use left & right arrows
	          pauseOnHover:true, //Stop animation while hovering
	          manualAdvance:false, //Force manual transitions
	          captionOpacity:0.8, //Universal caption opacity
	          beforeChange: function(){},
	          afterChange: function(){},
	          slideshowEnd: function(){} //Triggers after all slides have been shown

	      	});
			*/
	      });

// GA Event Tracking	
				function recordOutboundLink(link, category, action) {
				  try {
				    var myTracker=_gat._getTrackerByName();
				    _gaq.push(['myTracker._trackEvent', ' + category + ', ' + action + ']);
				    setTimeout('document.location = "' + link.href + '"', 100)
				  }catch(err){}
				}
