// JavaScript Document
//jQuery(function(){jQuery('ul.sf-menu').superfish({delay:0, speed: 'fast', autoArrows: false, dropShadows: false});});

Cufon.replace('.ge-mailinglist h3, .ge-company-content p, #ge-mailinglist-form button, .in-introduction-content-button a, .ge-hdrMsg h2, .sp-title-content-text h1, .sp-submenu li.title h3, .sp-side-header h3, #ge-content-frame h1, #ge-content-frame h2, #ge-content-frame h3, #ge-content-frame h4, #ge-content-frame h5, #ge-content-frame h6, #ge-content-frame-black h1, #ge-content-frame-black h2, #ge-content-frame-black h3, #ge-content-frame-black h4, #ge-content-frame-black h5, #ge-content-frame-black h6, .in-introduction-content h2', { fontFamily: 'droidsans' });

Cufon.replace('.ge-footer-content ul li h4', { fontFamily: 'droidsans-bold' });

$(document).ready(function() {
	$('.in-slideshow-rotate').cycle({
		fx:'scrollHorz', 
		timeout:5000,  
		speed:500, 
		pager:'.splash-control', 
		pagerAnchorBuilder: function(idx, slide) { return '<li class="in-splash-paginate-no"><a href="#"></a></li>'; } 
	});
	
	// open external links in new window
	$('a[href^="http://"]')
  .attr({
    target: "_blank"
  });
  
  // open locations in modal window
  $('a.iframe').fancybox({autoScale:false, overlayOpacity:.9, overlayColor:'#000', padding:6, titleShow:false, width:840, height:450, scrolling:'auto'});
	
});

jQuery(document).ready(function() {
  jQuery('#jcarousel-content-3').jcarousel({wrap: 'circular', scroll:3});
	jQuery('#jcarousel-content-5').jcarousel({wrap: 'circular', scroll:5});
	jQuery('#jcarousel-content-1').jcarousel({wrap: 'circular', scroll:1});
});

jQuery(function(){
	jQuery('ul.sf-menu').superfish({delay: 1000, animation: {opacity:'show',height:'show'}, dropShadows: false, autoArrows: false, speed: 'fast'});
});

// Showcase code - Quicksand and Fancybox
$(function(){
		// get the action filter option item on page load
  var $filterType = $('#filterOptions li.active a').attr('class');
	
  // get and assign the ourHolder element to the
	// $holder varible for use later
  var $holder = $('ul#list');

  // clone all items within the pre-assigned $holder element
  var $data = $holder.clone();

  // attempt to call Quicksand when a filter option
	// item is clicked
	$('#filterOptions li a').click(function(e) {
		// reset the active class on all the buttons
		$('#filterOptions li').removeClass('active');
		
		// assign the class of the clicked filter option
		// element to our $filterType variable
		var $filterType = $(this).attr('class');
		$(this).parent().addClass('active');
		
		if ($filterType == 'all') {
			// assign all li items to the $filteredData var when
			// the 'All' filter option is clicked
			var $filteredData = $data.find('li');
		} 
		else {
			// find all li elements that have our required $filterType
			// values for the data-type element
			var $filteredData = $data.find('li[data-type=' + $filterType + ']');
		}
		
		// call quicksand and assign transition parameters
		$holder.quicksand($filteredData, {
			duration: 800,
			easing: 'easeInOutQuad'
		}, function() { // callback function
    $('#list li a').fancybox({autoScale:false, overlayOpacity:.9, overlayColor:'#000', padding:6, titleShow:false});
  });
		return false;
	});
	$('#list li a').fancybox({autoScale:false, overlayOpacity:.9, overlayColor:'#000', padding:6, titleShow:false});
});
