jQuery(document).ready(function($) {

// ------------------------------------------------------------------------------
//  Sliders
// ------------------------------------------------------------------------------


		$(function(){
		  $("#slides").slides({
		    preload: true,
		    preloadImage: '../../wp-content/themes/nachos/images/loading.gif',
		    play: 5000,
		    pause: 2500,
		    hoverPause: true,
		    generatePagination: true,
		    bigTarget: true
		  });
		});
		
		
		$(function(){
		  $("#ipad-slides").slides({
		    preload: true,
		    preloadImage: '../../wp-content/themes/nachos/images/loading.gif',
		    play: 5000,
		    pause: 2500,
		    hoverPause: true,
		    generatePagination: true,
		    bigTarget: true
		  });
		});
		


// ------------------------------------------------------------------------------
// Tooltips
// ------------------------------------------------------------------------------

		$('a').tooltip({ 
		    track: true, 
		    delay: 2000, 
		    showURL: false, 
		    showBody: " - ", 
		    fade: 500 
		});
		
		$('img').tooltip({ 
		    track: true, 
		    delay: 2000, 
		    showURL: false, 
		    showBody: " - ", 
		    fade: 500 
		});
		



// ------------------------------------------------------------------------------
// App Container Hover
// ------------------------------------------------------------------------------


		$('.app').hover(
		 function() {
		  $('.app-title', this).addClass('app-title-hover');
		 },
		 function() {
		  $('.app-title', this).removeClass('app-title-hover');
		 }
		);
		
		
// ------------------------------------------------------------------------------
// External Links
// ------------------------------------------------------------------------------


		function externalLinks() {   
		 if (!document.getElementsByTagName) return;   
		 var anchors = document.getElementsByTagName("a");   
		 for (var i=0; i<anchors.length; i++) {   
		   var anchor = anchors[i];   
		   if (anchor.getAttribute("href") &&   
		       anchor.getAttribute("rel") == "external")   
		     anchor.target = "_blank";   
		 }   
		}   
		window.onload = externalLinks;


// ------------------------------------------------------------------------------
// End
// ------------------------------------------------------------------------------


});

