$(document).ready(function() {

	$('.ajax2').ajaxContent({   
		event:'mouseover',   
		target:'#textBD'  
	});
	
	var style = getCookie('mef_stileInUso');
	var re = new RegExp("MSIE ([0-9]{1,}[.0-9]{0,})");
	if (re.exec(navigator.userAgent) != null) ver = parseFloat( RegExp.$1 );
	if ( (style == 2) || (style == 2 && navigator.appName == 'Microsoft Internet Explorer' ) || (navigator.appName == 'Microsoft Internet Explorer' && ver < 6.0)  ){}else{
		//PODCAST
		jQuery("#mycarousel").jcarousel({
			scroll: 2,
			initCallback: mycarousel_initCallback,
			// This tells jCarousel NOT to autobuild prev/next buttons
			buttonNextHTML: null,
			buttonPrevHTML: null
		});
		
		
		jQuery("#mycarousel2").jcarousel({
			scroll: 1,
			initCallback: mycarousel_initCallback,
			buttonNextHTML: null,
			buttonPrevHTML: null
		});
		
		
	
	};
	var fn = function () { urchinTracker('/downloads/map'); }
	//$(".pidA").keypress(fn).click(fn);
	//$(".pidA").attr({"onclick":"javascript:urchinTracker ('/downloads/map');"});
	//DOCUMENTI
	
	$('#container-Doc').tabs({ initial:3, fxAutoHeight: false });
	$('#container-News').tabs({initial: 0});
	
});






function mycarousel_initCallback(carousel) {
    jQuery('.jcarousel-control a').bind('click', function() {
        carousel.scroll(jQuery.jcarousel.intval(jQuery(this).text()));
        return false;
    });
    jQuery('.jcarousel-scroll select').bind('change', function() {
        carousel.options.scroll = jQuery.jcarousel.intval(this.options[this.selectedIndex].value);
        return false;
    });
    jQuery('#mycarousel-next').bind('click', function() {
        carousel.next();
        return false;
    });
    jQuery('#mycarousel-prev').bind('click', function() {
        carousel.prev();
        return false;
    });
};


  
function reset_field()//chkStr
{
	//document.getElementById('id').value='';
	$('#id').value='';
	//$('#frm1').action='';
}

//recupera info dai cookie
function getCookie(c_name)
{
	if (document.cookie.length>0)
	{
		c_start=document.cookie.indexOf(c_name + "=");
		if (c_start!=-1)
		{ 
			c_start=c_start + c_name.length+1; 
			c_end=document.cookie.indexOf(";",c_start);
			if (c_end==-1) c_end=document.cookie.length;
			return unescape(document.cookie.substring(c_start,c_end));
		} 
	}
	return "";
}







