$(document).ready(function () {

	// campi di input
	handlerForInput('input.bgSwap', 'Cerca');


	
});


function showHide(n) {

/*
var n;
var temp = new Array();
temp = n.split(', ');
*/

	$(".toShow").attr("class","toHide1");
	$(".toHide").attr("class","toShow");
	$(".toHide1").attr("class","toHide");

}

function changeClass(id,a,b) {

	if ($("#"+id).size()>=1) {
		if($("#"+id).attr("class")==a) {
			$("#"+id).attr("class",b)
		} else if($("#"+id).attr("class")==b) {
			$("#"+id).attr("class",a)
		}
	}
}



/* Gestione campo input: mostra nasconde testo */

function handlerForInput(path,txt) {
	var $element = $(path),
	value = txt;
	
	// Add focus/blur label behavior to search box.
	$element.bind('focus', function () {
		if ($element.val() === value) {
			$element.val('');
		}
	});
	$element.bind('blur', function () {
		if ($element.val() === '' || $element.val() === value) {
			$element.val(value);
		}
	});
	$element.trigger('blur');
}

