function show(id) {
	$(id).show();
}

function hide(id) {
	$(id).hide();
}


function collapse(id) {
	$(id).slideUp(250, 'easeOutQuad');
}

function expand(id) {
	$(id).slideDown(250, 'easeOutQuad');
}


function collapse_and_enable(collapse, enable) {
	$(collapse).slideUp(250, 'easeOutQuad');
	$(enable).removeClass('disabled');
}

function expand_and_disable(expand, disable) {
	$(expand).slideDown(250, 'easeOutQuad');
	$(disable).addClass('disabled');
}




// Style Buttons in ie
// FOR:  adding inline styles to buttons to make them work in IE 6 + 7 (but not 8, ie8 is fine)

function style_buttons_for_ie()	{
	
	$('button.btn').each(function() {
		
	// i X Positioning
		var spanW 		= $(this).children('span').width();
		var iW			= $(this).children('i').width();
		var XPos		= spanW+iW;
		var XPosNum		= '-' + XPos + 'px';

		
	// i Y Positioning		
		var iH			= $(this).children('i').height();
		var iYPos		= '-' + iH + 'px'
		
	// Button Width
		var bW			= spanW+iW + 'px'		
		
		if (Object.prototype.toString.call(self.JSON) === "[object JSON]"){ 
			// IE8: Dont fix anything			
		}		
		
		else if (typeof document.body.style.maxHeight === "undefined") {		
			// ie6: Add inline styles			
			$(this).each(function()	{
				$(this).children('i').css({'position' : 'relative', 'right' : XPosNum, 'top' : iYPos});
				$(this).css({'height' : iH, 'width' : bW, 'overflow' : 'hidden', 'white-space' : 'nowrap', 'margin-right' : iW});
			})	

		} else {
			// ie7 (same fix as ie6 fix)
			
			$(this).each(function()	{
				$(this).children('i').css({'position' : 'relative', 'right' : XPosNum, 'top' : iYPos});
				$(this).css({'height' : iH, 'width' : bW, 'overflow' : 'hidden', 'white-space' : 'nowrap', 'margin-right' : iW})
			})

		}
	
	});

};


function h_align()	{

	diff		=	($('.features #banner li.two').width())-($('.features #banner .text').width());
	left		=	(diff/2);
	
	$('.features #banner .text').css({'position' : 'relative', 'left' : left});
	
};

function trigger_tab(id)	{

	$('.tabbed-content').hide();				// Hide All Tabs
	$('#' + id).show();							// Show the correct tab
	$('.nav-tabbed li').removeClass('active');	// Remove .active from all li's
	$('#link' + id).addClass('active');			// Add .active to the correct li

};








$(document).ready(function() {

	$("body").addClass("has-js");
	h_align();
	
	if($.browser.msie) {

		style_buttons_for_ie();
		
	} else {
		
	}
	
});








