/*..........................................................................................

NAME. JILLSCHOLES.JS
DATE.

..........................................................................................*/
/*.............................................*/

// Helping to toggle a fade
jQuery.fn.fadeToggle = function(speed, easing, callback) {
	return this.animate({ opacity: 'toggle' }, speed, easing, callback);
	};

function onBefore() {
    var src = $(this).find('img').attr('title'); 
    $("#number").html(src);
	}


$(document).ready(function() {
	
//$('#showcaseGallery img:first').css({ 'display' : 'none' });
//$("#showcaseGallery").animate({ opacity: 1 }, { duration: 300 });
	
		
var Toggled = false;
	
$("#showinfo").click(function () {
		
	$("#showcaseGallery").fadeToggle(750);
	$("#projecttext").fadeToggle(500);
		
	$(this).toggleClass("select");// Make this addclass!
		
	if(Toggled == false) { 
		$(this).html('Close project information'); Toggled = true;
	} else { 
		$(this).html('Project information'); Toggled = false;
	} 
	return false;
});

// FADE IN FIRST IMAGE
	
	// GRAB HEIGHT OF PRIMARY NAV
//var ease = 'easeInOutCubic';	

//var menu = $('#primaryMenu');
//var menuHeight = menu.height() + 30;
//var myTimer = {};
	
myTimer = $.timer(2000, function(){
		
	$('#showcaseGallery .blackBg:first').fadeIn(1500, function() {
			
		//menu.animate({ marginTop: -menuHeight }, { duration: 1000, easing: ease, complete: function() {
			
		$('#showcaseGallery').cycle({ 
			fx: 'fade', 
			speed: 750, 
			timeout: 0, 
			prev: '#prev',
			next: '#next',
			before: onBefore,
			sync: 1
		});
	//}
	//});
	
});
});

var projectLink = $('#primaryMenu > ul a');

projectLink





}); // END DOM

