// JavaScript Document
var $j = jQuery.noConflict();

// from easing plugin :http://gsgd.co.uk/sandbox/jquery/easing/jquery.easing.1.3.js
$j.easing.elasout = function(x, t, b, c, d) 
	{
	//easeoutexpo
	return (t==d) ? b+c : c * (-Math.pow(2, -10 * t/d) + 1) + b;
	};

$j(document).ready(function() 
{
	$j('.tabcomponent').each(function()
		{
		 $j(this).children('.tabbox').hide();
		 $j(this).children('div.tabbox:eq(0)').show();
		});
	
	$j('ul.pricetabs li a').click(function(e)
			{
			e.preventDefault();
			$j(this).parent('li').parent('ul').children('li').removeClass('front');
			$j(this).parent('li').parent('ul').children('li').addClass('behind');
			$j(this).parent('li').addClass('front');
			var targetContent = $j(this).attr('href');
			$j(this).parent('li').parent('ul').parent('.tabcomponent').children('.tabbox').hide();
			//$j(targetContent).fadeIn();
			$j(targetContent).show();
			});
	


	$j('.btn-totop').click(function(e)
		{
		e.preventDefault();
		//alert($j(this).attr("href"));
		$j.scrollTo( $j(this).attr("href"), 800, {easing:'elasout'} );

    	});


	
});

