// JavaScript Document
var idFontSelect	= "select#police ";
var idFontImg		= "img#fontpreview ";
var idImpressionSelect = "select#impression ";
var classToHide = ".tohide";
$(document).ready(function(){
	changeImgFont();
	$(idFontSelect).change(function(){changeImgFont()}).keypress(function(){changeImgFont()});
	$(idImpressionSelect).change(function(){swapHide();}).keypress(function(){swapHide()});
	$(classToHide).hide();});

function changeImgFont(){
		$(idFontImg).attr('src', $(idFontSelect + 'option:selected').attr('title'));
}
function swapHide(){
		if($(idImpressionSelect + 'option:selected').text().substring(0,1) == 'O')
			$(classToHide).show();
		else
			$(classToHide).hide();
}
