//Fade Function
(function(jQuery) {
	jQuery.fn.customFadeIn = function(speed, callback) {
		jQuery(this).fadeIn(speed, function() {
			if(jQuery.browser.msie)
				jQuery(this).get(0).style.removeAttribute('filter');
			if(callback != undefined)
				callback();
		});
	};
	jQuery.fn.customFadeOut = function(speed, callback) {
		jQuery(this).fadeOut(speed, function() {
			if(jQuery.browser.msie)
				jQuery(this).get(0).style.removeAttribute('filter');
			if(callback != undefined)
				callback();
		});
	};
})(jQuery);

$(document).ready(
	function() {
	    jQuery('#location_menu_button').hover(
		function () {
		    jQuery('#location_menu').customFadeIn('slow', function () { });
		    jQuery('#location_menu_button a').addClass("over");

		},
		function () {
		    jQuery('#location_menu').customFadeOut('fast', function () { });
		    jQuery('#location_menu_button a').removeClass("over");
		});

		$('#showcase ul').innerfade({
			speed: 1500,
			timeout: 6000,
			type: 'sequence',
			containerheight: '426px'
		});
		
		$('#imageoverlay').customFadeIn(2000, function() {
			$('#imageoverlay h2').customFadeIn(1000, function() {
				$('#imageoverlay p').customFadeIn(1000, function() {
				    $('#imageoverlay #servicesbutton').customFadeIn(1000);
				});
			});
		});

});
