// =============
// = Analytics =
// =============
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-21325556-1']);
_gaq.push(['_trackPageview']);

(function() {
	var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
	ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
	var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();

// =====================
// = AddThis Analytics =
// =====================
var addthis_config = {
	data_ga_property: 'UA-21325556-1',
	data_track_clickback: true
};

// =============
// = Slideshow =
// =============
$(function() {

	$(".slidetabs").tabs(".images > div", {

	// enable "cross-fading" effect
	effect: 'fade',
	fadeOutSpeed: 'slow',

	// start from the beginning after the last tab
	rotate: true

	// use the slideshow plugin. It accepts its own configuration
	}).slideshow(
		{
			autoplay: true,
			interval: 4000
		}
	);
});

// ============
// = Slickbox =
// ============
$(function() {
	//Hides the slickbox as soon as the DOM is ready
	$('#slickbox').hide();

	//Shows the slickbox on clicking the noted link
	$('a#slick-down').click(function()
	{
		$('#slickbox').slideDown('slow');
		return false;
	});

	//Hides the slickbox on clicking the noted link
	$('a#slick-up').click(function() {
		$('#slickbox').slideUp('slow');
		return false;
	});
});



// ===================
// = Form Validation =
// ===================

$(function() {
						
			//Form Validation
			$("#contact-quick").validator();
					  	  	
			
			//Hides the slickbox as soon as the DOM is ready
			//(a little sooner than page load)
			$('#slickbox').hide();

			//Shows the slickbox on clicking the noted link  
			$('a#slick-down').click(function() 
			{
				jQuery('#slickbox').slideDown('slow');
				return false;
			});

			//Hides the slickbox on clicking the noted link  
			$('a#slick-up').click(function() {
				jQuery('#slickbox').slideUp('slow');
				return false;
			});
		});
		

