$(function() {
	$(".order").mouseover(function() {
		$(".order").css('cursor','pointer');
		var where = $(this).attr("rel");
		$(".order").click(function() {
			location = "request.cfm?plan="+where;
		});
	});
	$("#accesspoints li").mouseover(function() {
		$(this).css('cursor','pointer');
		$(this).click(function() {
			var ap = $(this).attr("rel");
			$("#apimg").attr('src', 'images/'+ap+'.jpg');
		});
	});
	if($("#gw").length != 0) {
		var gw = $("#gw").val();
		$("#img").attr("src", "images/"+gw+".gif");		
	}
	$("#send").click(function() {
		$(".msg").css("visibility","hidden");
		var go = 0;
		var gw = $("#gw").val();
		var tmp = $("#key").val();
		var tmp2 = tmp.toLowerCase();
		var ca = tmp2.replace(/ /g,"");
		if(gw == 1 && ca == "hello") {
			go = 1;
		}
		if(gw == 2 && ca == "mommy") {
			go = 1;
		}
		if(gw == 3 && ca == "shoes") {
			go = 1;
		}
		if(gw == 4 && ca == "fries") {
			go = 1;
		}
		if(gw == 5 && ca == "spank") {
			go = 1;
		}
		if(go == 1) {
			$("#cont").submit();
		} else {
			$(".msg").css({"visibility":"visible", "color":"#ff0000","font-weight":"700"});
		}
	});
  $('#faqs h3').each(function() {
    var tis = $(this), state = false, answer = tis.next('div').slideUp();
    tis.click(function() {
      state = !state;
      answer.slideToggle(state);
      tis.toggleClass('active',state);
    });
  });
});

var lowercase = 'This Is A Sample'.toLowerCase();
var Replace= 'This Is A Sample'.replace(/ /g,"-");

