$(document).ready(function () {


	Cufon.replace('h1, h2, h3, p#strap-line, div#top-content p.summary',{
		hover: true
	});
	

	
	//Hide website styling if within an iframe
	var isInIFrame = (window.location != window.parent.location) ? true : false;
	if(isInIFrame == true) {
		// alert('is in iFrame');
		$('div#float-top').hide();
		$('div#footer').hide();
		$('div#top-content').css({'margin-top' : '0', 'background' : 'none'});
		$('div.generic').css('padding','0');
		$('.site-width').css({'width' : 'auto', 'background' : 'none'});
		$('div#site-holder').css('padding','30px');
	}
	
	//Fancybox
	if($('a#lightbox-form').length) {
		$('a#lightbox-form').fancybox({
			'width':450,
			'height':580,
			'titleShow':false,
			'autoScale':false,
			'type':'iframe'
		})
	}
	
	//Float Text
	$("#float-text").appendTo("#footer").css('position', 'static').children('div').hide();
	$('#float-text h1 a').click(function() {
		$(this).parent('h1').next('div').animate({
			"height": "toggle", 
			"opacity": "toggle"
		}, 300, function() {
			location.href = '#float-h1';
		});
		return false;
	});
	
	//Default Action
	$(".tab_content").hide(); //Hide all content
	$("ul.tabs li:first").addClass("active").show(); //Activate first tab
	$(".tab_content:first").show(); //Show first tab content
	
	//On Click Event
	$("ul.tabs li").click(function() {
		$("ul.tabs li").removeClass("active"); //Remove any "active" class
		$(this).addClass("active"); //Add "active" class to selected tab
		$(".tab_content").hide(); //Hide all tab content
		var activeTab = $(this).find("a").attr("href"); //Find the rel attribute value to identify the active tab + content
		$(activeTab).fadeIn(); //Fade in the active content
		return false;
	});
});


