//////////////// embedding media player / mp3

$(document).ready(function(){
						   
 $('a[@href$="mp3"]').flash(
        { src: '/mediaplayer.swf', height: 20, width: 185 },
        { version: 7 },
        function(htmlOptions) {
            $this = $(this);
            htmlOptions.flashvars.file = $this.attr('href');
            $this.before($.fn.flash.transform(htmlOptions));						
        }
    );
 



//////////////// embedding media player / flv


						   
 $('a[@href$="flv"]').flash(
        { src: '/mediaplayer.swf'},
        { version: 7 },
        function(htmlOptions) {
            $this = $(this);
            htmlOptions.flashvars.file = $this.attr('href');
            $this.before($.fn.flash.transform(htmlOptions)); 
        }
    );
 




//////////////////////////////////


	//$("#sel div").css({opacity:0.5});
	$("#notizia_1").addClass("secondC");
	$("#immagine_1").show();


		
	$("#sel DIV").click(function(){

		if ( $(this).hasClass("secondC") ) {
			var target = $("A", this).attr("href");
			window.open(target, '_self');	
		}
			
		$(".modulo1").removeClass("secondC");
		
		$(this).fadeTo("fast", 1).addClass("secondC");
				
		var what = $(this).attr("rel");
		
		$("#home1 DIV").hide();
		
		//$("#sel div").css({opacity:0.5});

		$("#"+what).fadeIn(400);
		
	

	});



	
	

/////////////////////////////////// Ajax

	$(".bepopup").click(function () {
	
		var url = $(this).attr("rel");
		//alert (url);
		$(".bigimg").load(url, function () {
										 
        $(this).fadeIn("fast");
		
      });
		
	
	});
	
	/*
	$(".bigimg").click(function () {
		$(this).fadeOut("fast");
	});*/
	


/*$("DIV:not(.bigimg)").css("background-color", "yellow");*/




 });