$(function(){
	//display password field
	$("#email").blur(function(){
		if($("#name").val()=="Megan" && $("#email").val()=="megan@allisonirahetaweb.com"){
			$("#fieldpass").css({display:"block"});
		}
	})
	
	//custom file input styling
	$(".replace").val("No file chosen");
	$('input[type="file"]').css({opacity:"0"});
	$('input[type="file"]').change(function(){
		$(".replace").val($('input[type="file"]').val())										 
	})
	
	//valid target="_blank"
	$('a[rel="external"]').click(function(){
		window.open($(this).attr("href"))
		return false;
	})
	
	$.get(
		'token.php',
		function(result){
			$("form p").append('<input type="hidden" name="ts" value="'+result+'">')				
		}
	)
})

function defineSelection(id){
	$($(id).parent()).addClass("selected")
}