function searchFormActions(){
	// se in pagina e" presente il form di ricerca: appendo le azioni da intraprendere
	if($("#mc_formricerca").length > 0) {
		$("#mc_formricerca").submit(function(){ // per submit
			if(
				($("#mcr_filtro_canali").attr("value") == "Tutti") &&
				($("#mcr_filtro_tipo").attr("value") == "Tutti") &&
				($("#mcr_filtro_testo").attr("value") == "Cerca")
			) return false;
			else return true;
		});
		var oldVal = "";
		$("input#mcr_filtro_testo")
			.focus(function(){
				oldVal = this.value;
				/*if(this.value == "Cerca")*/ this.value = "";
			})
			.blur(function(){
				if(this.value == "") /*this.value = "Cerca";*/
					this.value = oldVal;
			});
		if($("#mcr_submit").length > 0)
			$("#mcr_submit")
				.hover(
					function(){
						$(this).toggleClass("hovering");
					},
					function(){
						$(this).toggleClass("hovering");
					}
				);
			if($(".btn_Search").length > 0)
			$(".btn_Search")
				.hover(
					function(){
						$(this).toggleClass("hovering");
					},
					function(){
						$(this).toggleClass("hovering");
					}
				);
			if($('span.lbl_Check').length > 0){
				$('span.lbl_Check')
					.hover(
						function(){
							$(this).css({
								"cursor": "pointer",
								"text-decoration": "underline"
							});
						},
						function(){
							$(this).css({
								"cursor": "normal",
								"text-decoration": "none"
							});
						})
					.click(function(){
						var index = $('span.lbl_Check').index(this);
						$(".inp_Check:eq(" + index + ")").attr("checked", "checked");
					});
					
					
			}
	}
	

}

function mc_condividi(media){
	var mc_location = escape(document.location);
	var mc_title = escape(document.title);
	var wtitle = document.title.substring(0,document.title.indexOf('- Il Sole 24 ORE'));
	wtitle = escape(wtitle.replace(/\s+$/g,''));
	var description;
	var metas = document.getElementsByTagName('meta');
	for (var x = 0, y = metas.length; x < y; x++) {
		if (metas[x].name.toLowerCase() == "description") {
			description = metas[x];
		}
	}
	switch(media){
		case "facebook":
			url = "http://www.facebook.com/sharer.php?u=" + location;
			break;
		case "wikio":
			url = "http://www.wikio.it/vote?domain=ilsole24ore.com&title=" + wtitle;
			break;
		case "oknotizie":
			url = "http://oknotizie.alice.it/post?url=" + mc_location + "&title=" + mc_title;
			break;
		case "delicious":
			url = "http://del.icio.us/post?v=4&noui&jump=close&url=" + mc_location + "&title=" + mc_title;
			break;
		case "linkedin":
			url = "http://www.linkedin.com/shareArticle?mini=true&url=" + mc_location + "&title=" + mc_title + "&summary=" + escape(description.content) + "&source=Il Sole 24 ORE";
			break;  
	}
	window.open(url, 'tools');
}
