        // Mouse Colony 2009 //

$(document).ready(function(){

	// NEED COPY replacer
	
	//$("p:contains('Lorem'), p:contains('Sed'), p:contains('Nemo'), p:contains('Neque'), p:contains('Quis'), //p:contains('vero'), p:contains('Temporibus'), em:contains(vero)").each(function() {
//		$(this).replaceWith("<p style='font-size:2.6em;margin:0;'>NEED CONTENT</p><p>This is a JQuery //function replacing Lorem ipsum text (Comment this function out in the JS file if you want to see it).</p>")
//	});

	// Breadcrumbs
	
	$(".breadcrumbList li:last").css({"font-weight":"bold","background":"none"});

	// Strip borders from last LI in footer navigations //

	$('#footer ul li:last-child').css({borderRight: 'none'});
	
		
	// Tour Page Functions
	
	// tour navigation
	
	$(".tourContentLeft ul:first li:first").each(function() {
		$(this).addClass("selected");
		$(this).find("span.arrow").show();
	});
	
	$(".tourContentLeft ul:first a").click(function() {
		$(this).parent().parent().find("li:not($(this))").removeClass("selected");
		$(this).parent().parent().find("li:not($(this)) span.arrow").hide();
		$(this).parent().addClass("selected");
		$(this).find("span.arrow").show();
	});

	
	// get ID
	
	$(".tourSamples > div").each(function() {
		
		var trapID = $(this).attr("id");
		var newID = trapID.split(' ').join('');
		
		$(this).attr({id:"tour"+newID});
		
	});
	
	// add right margin to even DLs
	
	$(".tourSamples > div dl").each(function() {
		$(this).parent().find("dl:even").css("margin-right","9px");
	});
	
	// hover effects
	
	$(".tourSamples div div dl dd, .interiorFeatureSubList dd").hover(function() {
		$(this).addClass('selected');
		$("a > span",this).show();
	}, function() {
		$(this).removeClass('selected');
		$("a > span",this).hide();
	});
	
	
	// See features
	
	$(".interiorFeatureList li").each(function() {
		$("dl:last",this).css({"margin-bottom":"40px"});
	});
	
});

jQuery(function( $ ){

	// Tour ScrollTo //

	$.easing.elasout = function(x, t, b, c, d) {
		var s=1.70158;var p=0;var a=c;
		if (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3;
		if (a < Math.abs(c)) { a=c; var s=p/4; }
		else var s = p/(2*Math.PI) * Math.asin (c/a);
		return a*Math.pow(2,-10*t) * Math.sin( (t*d-s)*(2*Math.PI)/p ) + c + b;
	};

	
	
	
	$('div.tourContentRight').scrollTo(0);
	$.scrollTo(0);
	
	var $paneTarget = $('.tourContentRight');
	
	$('.tourListMain .mainModules').click(function(){
		$paneTarget.stop().scrollTo('#tourMainModules', 700, { duration: 2000 });
		return false;
	});
		
	$('.tourListMain .functionalityModules').click(function(){
		$paneTarget.stop().scrollTo('#tourFunctionalityModules', 700, { duration: 2000 });
		return false;
	});
	
	$('.tourListMain .analysisTools').click(function(){
		$paneTarget.stop().scrollTo('#tourAnalysisTools', 700, { duration: 2000 });
		return false;
	});
		
		
		
		
});





    
