$(document).ready(function(){

	
	
	$(".work_header .main, .works span, .mycaroussel_affiche").hoverIntent({
		sensitivity: 3,
		interval: 0,
		timeout: 0,
		over: function(){
			if (!$.browser.msie){
			 //$(".shorttitle", $(this)).show().css({opacity : 0.75}); 
			  //$(".intro_bg", $(this)).show().css({opacity : 0.75}); 
			$(".intro_bg, p", $(this)).show().animate({
			  opacity: 0.75
			}, 500, function() {
			// Animation complete.
			 });
		    }
			//if (!$.browser.msie) $(".intro_bg, p", $(this)).fadeIn();
		    else 
              $(".intro_bg, p", $(this)).show().css({opacity:0.75});
		},
		out: function(){
			if (!$.browser.msie){
			 // $(".shorttitle", $(this)).show().css({opacity : 0}); 
			 // $(".intro_bg", $(this)).show().css({opacity : 0}); 

			$(".intro_bg, p", $(this)).animate({
			 opacity: 0
			 }, 500, function() {
			    // Animation complete.
			  });
            }
			//if (!$.browser.msie) $(".intro_bg, p", $(this)).fadeOut();
			else 
			$(".intro_bg, p", $(this)).hide();  
		}
	}).click(function(){
		if(this.id==""){this.id="jqmWindow";}
		$("."+this.id).jqmShow({
			modal: true
		});
		return false;
	});

	
		
	$(".logo img, .menu img, .work_header,music_header, .works span, .window_bg, .window .close, .contact_info img, .window_bg_b").pngfix();
	$(".menu a").hover(function(){
		$("span", $(this)).css("top", "-18px");
		$("img", $(this)).css("top", "-18px");
	}, function(){
		$("span", $(this)).css("top", "0");
		$("img", $(this)).css("top", "0");
	});
	
	$(".contact_info .email").hover(function(){
		$("span", $(this)).css("top", "-15px");
		$("img", $(this)).css("top", "-15px");
	}, function(){
		$("span", $(this)).css("top", "0");
		$("img", $(this)).css("top", "0");
	});
	
	$(".contact_info-f .email").hover(function(){
               $("span", $(this)).css("top", "-15px");
               $("img", $(this)).css("top", "-15px");
       }, function(){
               $("span", $(this)).css("top", "0");
               $("img", $(this)).css("top", "0");
       });
	
	
	$(".work_header").hover(function(){
		$(".work_header .feature h1 a").css("color", "#000");
	}, function(){
		$(".work_header .feature h1 a").css("color", "#900");
	}).click(function(){
		$(".jqmWindow").jqmShow({
			modal: true
		});
		return false;
	});
$(".music_header").hover(function(){
		$(".music_header .feature h1 a").css("color", "#000");
	}, function(){
		$(".music_header .feature h1 a").css("color", "#900");
	}).click(function(){
		$(".jqmWindow").jqmShow({
			modal: true
		});
		return false;
	});

$("div#supersize").supersize();

	
	

});


if (document.getElementById) {
	 document.writeln('<style type="text/css"><!--')
	 document.writeln('.texter {display:none} @media print {.texter {display:block;}}')
	 document.writeln('//--></style>') }

	function openClose(theID, shortDESC) {
	 if (document.getElementById(theID).style.display == "block") { 
		 document.getElementById(theID).style.display = "none"; 
		 $("#"+shortDESC).css("display", "block");
		} else { 
			document.getElementById(theID).style.display = "block";
			$("#"+shortDESC).css("display", "none");
				} 
	 }
(function($){
	
	//Resize image on ready or resize
	$.fn.supersize = function() {	

		//Invoke the resizenow() function on document ready
		$(document).ready(function() {
			$('#supersize').resizenow(); 
		});
		//Invoke the resizenow() function on browser resize
		$(window).bind("resize", function() {
    		$('#supersize').resizenow(); 
		});
	};
	//Adjust image size
	$.fn.resizenow = function() {
    
	//Gather browser dimensions	
	 var browserwidth;
	 var browserheight;
	 // the more standards compliant browsers (mozilla/netscape/opera/IE7) use window.innerWidth and window.innerHeight
	 if (typeof window.innerWidth != 'undefined')
		{
		  browserwidth = window.innerWidth,
		  browserheight = window.innerHeight
		}
	// IE6 in standards compliant mode (i.e. with a valid doctype as the first line in the document)
	 else if (typeof document.documentElement != 'undefined'
		 && typeof document.documentElement.clientWidth !=
		 'undefined' && document.documentElement.clientWidth != 0)
		{
		   browserwidth = document.documentElement.clientWidth,
		   browserheight = document.documentElement.clientHeight
		}
	  // older versions of IE
	 else
		{
		   browserwidth = document.getElementsByTagName('body')[0].clientWidth,
		   browserheight = document.getElementsByTagName('body')[0].clientHeight
		}
		//Define starting width and height values for the original image
		var startwidth = 400;  
		var startheight = 200;
		//Define image ratio
		var ratio = startheight/startwidth;

		//Resize image to proper ratio
		if ((browserheight/browserwidth) > ratio) {
		    $(this).height(browserheight);
		    $(this).width(browserheight / ratio);
		    $(this).children().height(browserheight);
		    $(this).children().width(browserheight / ratio);
		} else {
		    $(this).width(browserwidth);
		    $(this).height(browserwidth * ratio);
		    $(this).children().width(browserwidth);
		    $(this).children().height(browserwidth * ratio);
		}
		//Make sure the image stays center in the window

		$(this).children().css('left', (browserwidth - $(this).width())/2);
		$(this).children().css('top', (browserheight - $(this).height())/2);
	};
})(jQuery);


