
        function formatText(index, panel) {
		  return index + "";
	    }
    
        $(function () {
        
            $('.anythingSlider').anythingSlider({
                easing: "easeInOutExpo",        // Anything other than "linear" or "swing" requires the easing plugin
                autoPlay: true,                 // This turns off the entire FUNCTIONALY, not just if it starts running or not.
                delay: 6000,                    // How long between slide transitions in AutoPlay mode
                startStopped: false,            // If autoPlay is on, this can force it to start stopped
                animationTime: 600,             // How long the slide transition takes
                hashTags: true,                 // Should links change the hashtag in the URL?
                buildNavigation: true,          // If true, builds and list of anchor links to link to each slide
        		pauseOnHover: true,             // If true, and autoPlay is enabled, the show will pause on hover
        		startText: "Go",             // Start text
		        stopText: "Stop",               // Stop text
		        navigationFormatter: formatText       // Details at the top of the file on this use (advanced use)
            });
            
            $("#slide-jump").click(function(){
                $('.anythingSlider').anythingSlider(6);
            });
            
        });
        
        
Cufon.replace('h3', { fontFamily: 'Futura-Book'});
Cufon.replace('h2', { fontFamily: 'Futura-Light'});
Cufon.replace('h6', { fontFamily: 'Baskerville'});
Cufon.replace('#our-services a h2', { fontFamily: 'Futura-Book', hover: {color:'#fff;'}});
Cufon.replace('#our-services a:hover h2', { fontFamily: 'Futura-Book', hover: true});
Cufon.replace('#services-nav-menu li a h4', { fontFamily: 'Futura-Light', hover: true, color: '#454545;', textShadow: '0px 1px 0px #f8f8f8'});
Cufon.replace('h1', { fontFamily: 'Futura-Book',textShadow: '0px 1px 0px #f1f1f1'});
Cufon.replace('a h4', { fontFamily: 'Futura-Bold', textShadow: '0px 0.6px 5px #dff18e', hover: true});
Cufon.replace('a.green-btn', {fontFamily: 'Futura-Bold', hover: {textShadow: '0px 0.6px 5px #f1f1f1'}})('a.yellow-btn-on-blue-bg', {hover: true, textShadow: '0px 0.6px 5px #f1f1f1'});
Cufon.replace('h4, #left-sidebar ul li a', { fontFamily: 'Futura-Bold', hover: true});
Cufon.replace('.tabNavigation a h2', { fontFamily: 'Futura-Bold'});


		// navigation services button
        $(document).ready(function() {

            $("#nav-services a").mouseover(function(e) {          

				$("div#services-nav-menu").toggle();
				$("#nav-services a").toggleClass("open");
            });

		//	$('div#services-nav-menu').mouseup(function() {
		//		setTimeout(function(){ 
		//			$("#nav-services a").removeClass("open");
		//			$("div#services-nav-menu").hide();;
		//		}, 10000);
		//	});	
			
		$('body').click(function(event) {
    if (!$(event.target).closest('#div#services-nav-menu').length) {
       $('div#services-nav-menu').hide();
   };
	
		 $('#nav-about, #nav-testimonials').mouseover(function(){
     if (!$(event.target).closest('#nav-about, #nav-testimonials').length) {
        $('div#services-nav-menu').hide();
    };
		     });

});		
			
});


$(document).ready(function() {
			/*
			*   Examples - images
			*/

			$("a.popupPhoto").fancybox({
				'titleShow'		: false
			});

			$("a#example2").fancybox({
				'titleShow'		: false,
				'transitionIn'	: 'elastic',
				'transitionOut'	: 'elastic'
			});

			$("a#example3").fancybox({
				'titleShow'		: false,
				'transitionIn'	: 'none',
				'transitionOut'	: 'none'
			});

			$("a#example4").fancybox();

			$("a#example5").fancybox({
				'titlePosition'	: 'inside'
			});

			$("a#example6").fancybox({
				'titlePosition'	: 'over'
			});

			$("a[rel=popupPhoto]").fancybox({
				'transitionIn'		: 'none',
				'transitionOut'		: 'none',
				'titlePosition' 	: 'over',
				'titleFormat'		: function(title, currentArray, currentIndex, currentOpts) {
					return '<span id="fancybox-title-over">Image ' + (currentIndex + 1) + ' / ' + currentArray.length + (title.length ? ' &nbsp; ' + title : '') + '</span>';
				}
			});


		});
