// JavaScript Document

function showSignup() {
	var url = "sign_up.php?keepThis=true&amp;TB_iframe=true&amp;height=600&amp;width=459&amp;modal=true";
	tb_show(null, url);
}


$(document).ready(function(){
	$('#keywords').click( function() {
		if ($('#keywords').val() == "know your product") $('#keywords').val('');
	});
	
	$('.ro img').hover( function() {
		this.src = this.src.replace("_off","_on");
	}, function() {
	 	this.src = this.src.replace("_on","_off");
	});
	
	$('.burger').hover( function() {
		var where = $(this).attr('alt');
		where = where.toLowerCase();				 
		this.src = this.src.replace("_off","_on");
		$('ul .' + where).addClass('selected');
	}, function() {
		var where = $(this).attr('alt');
		where = where.toLowerCase();
	 	this.src = this.src.replace("_on","_off");
		$('ul .' + where).removeClass('selected');
	});
	
	$('.link').hover( function() {
		var where = $(this).attr('id');
		where = where.toLowerCase();				 
		$('.map .' + where).attr("src", "images/burger_on.gif");
	}, function() {
		var where = $(this).attr('id');
		where = where.toLowerCase();
	 	$('.map .' + where).attr("src", "images/burger_off.gif");
	});
	
	$('div.details').css("display", "none");
	$('div.overview').css("display", "block");
	$('li.overview').toggleClass("selected");
	
	$('.search_options li a').click(function() {
		var which = $(this).attr('class');
		
		$('div.details').css("display", "none");
		$('.search_options li').removeClass("selected");
		
		$('.search_options li.' + which).addClass("selected");
		$('div.' + which).css("display", "block");
		
		return false;
	});	
	
	$('.swapImg').click(function() {
		var newImg = $(this).attr('rev');
		var bigImg = $(this).attr('href');
		var dimensions = $(this).attr('rel');
		
		var sizeArr = dimensions.split(',');
		
		$('#Zoomer img').attr("src", newImg);
		$('.mainImg').attr("width", sizeArr[0]);
		$('.mainImg').attr("height", sizeArr[1]);
		
		$('.MagicZoomBigImageCont img').attr("src", bigImg);
		$('.zoomMe').attr("href", bigImg);
		
		return false;								 
	});
});
