var shown = -1;

function hidem() {
	$('#s'+shown+' span').remove();
	$('#s'+shown).hide();
	$('#n'+shown+' a').removeClass('on');
	$('#detailsPop').hide();
	$('#ovr').hide();
	shown = -1;
}

function spaJetsOn() {
	$(this).children('img').attr('src','../images/jets/on/'+$(this).children('img').attr('src').substr(15));
	$('#jets-feature .jets-info').html($(this).next().html());
	$('#jets-feature .jets-info').prepend('<h2>'+$(this).children('b').html()+'</h2>');
	$('#jets-feature .def-inside').hide();
	$('#jets-feature .jets-info').show();
}
function spaJetsOff() {
	$(this).children('img').attr('src','../images/jets/'+$(this).children('img').attr('src').substr(18));
	$('#jets-feature .jets-info').empty().hide();
	$('#jets-feature .def-inside').show();
}

function newsPop() {
		$('body').append('<a href="" id="hider"></a><iframe id="signupframe" src="http://www.sundancespas.com/signup.html" width="375" height="360" frameborder="0"></iframe><a href="" id="closer">close</a>');
		$('#hider, #closer').click(removeLB);
		$('#hider').height($('body').height());
		return false;
}

function removeLB() {
	$('#hider, #signupframe, #closer').remove();
	return false;
}

var tmpclk;
var popX; var popY; var minX; var maxX; var minY; var maxY;
$(function(){
	$('body').append('<a href="" id="ovr"></a>');
	$('input').blur(function() {
		if($(this).val() == "") {
			$(this).val($(this).attr('title'));
			if($(this).attr('title')) {
				$(this).attr('title','');
			}
		}
	});
	$('input').focus(function() {
		tmpclk = $(this).val();
		if((!($(this).attr('title'))) && (tmpclk == '')) {
			$(this).attr('title',tmpclk).val("");
		}
	});	
	$('#ovr').mouseover(hidem);
	var st = $('#n0 a').attr('href');
	var ps = st.indexOf('spas.html');
	st = st.substr(0,ps);
	if($.browser.msie && (jQuery.browser.version < 7.0)) {
		$('head').append('<link rel="stylesheet" href="includes/ie6.css" />');
	}
	
	if($('#difference_sub')) {
		$('#difference_sub div:last').css('border-bottom','none');
	}
	
});
