$(document).ready(function(){
	if ($.browser.safari){
	   	$("#news h1, #agenda h1, #newsletter h1, #social-networks h1, input#mailing-submit").css("padding","1px 7px");
	    $("#news h3, #agenda h3").css("padding","2px 7px 0 7px");
	}

	$("#showcase img").each(function(){
		var origZindex = $(this).css('z-index');
		$(this).hover(
			function(){
				$(this).css('z-index',99);
			}, 
			function(){
				$(this).css('z-index',origZindex);
			}
		);
	});
	
	$("#showcase a, #navigation li a:last").nyroModal({bgColor: '#282828'});
	$("#news ul li p span a, #agenda ul li p span a, .single-event h4 a").nyroModal({bgColor: '#282828', minHeight: '100'});
	$("#navigation li a:eq(2)").nyroModal({bgColor: '#282828', minHeight: '600'});
	
	$("input#mailing-email").focus(function(){
		if(this.value == this.defaultValue){
			this.value = "";
		}
		}).blur(function(){
			if(this.value == ""){
				this.value = this.defaultValue;
			}
	});
	
	if ($.browser.msie || $.browser.opera){
	   	$("#showcase img#small").rotateLeft(1.5);
		$("#showcase img#medium").rotateLeft(-1.1);
		$("#showcase img#large").rotateLeft(-2.0);
	}

});