jQuery(document).ready(function(){

/* Tabs */
jQuery(".tab-content").hide() /* Hide all content. */
jQuery("ul.tabs li:first").addClass("active").show(); /* Activate first tab */
jQuery(".tab-content:first").show(); /* Shows the content for the first tab. */

/* On click event */
jQuery("ul.tabs li").click(function() {
jQuery("ul.tabs li").removeClass("active"); /* Removes any "active" class. */
jQuery(this).addClass("active"); /* Adds "active" class to selected tab. */
jQuery(".tab-content").hide(); /* Hides all tab contents. */
	var activeTab = jQuery(this).find("a").attr("href"); /* Find the href attribute value to identify the active tab/content. */
	jQuery(activeTab).fadeIn(); /* Fade in the active ID contents. */
	return false;
}); /* Tabs */

/* Scroll to top */
jQuery('a[href*=#header]').click(function() {
		if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'')
		&& location.hostname == this.hostname) {
		var jQuerytarget = jQuery(this.hash);
		jQuerytarget = jQuerytarget.length && jQuerytarget
		|| jQuery('[name=' + this.hash.slice(1) +']');
		if (jQuerytarget.length) {
		var targetOffset = jQuerytarget.offset().top;
		jQuery('html, body')
		.animate({scrollTop: targetOffset}, 1000);
		return false;
		}
	}
}); /* Scroll to top */

}); /* jQuery */