$(document).ready(
   function()
   {
		/* external link */		
		$("a[rel='blank']").click(function(){
			window.open($(this).attr('href'));
			return false;
		});

		// hover image replace
		$(".tabs li a").hover(
			function(){
				if ($(this).attr("class") != "solapa_senal on")
				{
					$(this).find("div").addClass($(this).find("div").attr("id")+"_on");
					$(this).find("div").removeClass($(this).find("div").attr("id")+"_of");
				}
				
			},
			function(){				
				if ($(this).attr("class") != "solapa_senal on")
				{
					$(this).find("div").addClass($(this).find("div").attr("id")+"_of");
					$(this).find("div").removeClass($(this).find("div").attr("id")+"_on");
				}
				
			}
		);

		$(".calendar table tr td:first-child").css("border-left","0");
		$(".calendar table tr th:first").css("border-left","0");


		if($("#slider").length > 0)
			$("#slider").easySlider();

		$(".item3").click(function(){
			$("#mail form").fadeIn("slow");	
			return false;
		});

		$("#mail button.cancelar").click(function(){
			$("#mail form").fadeOut("slow");	
			return false;
		});

		

		/*
		The new 'validTags' setting is optional and allows
		you to specify other HTML elements that curvyCorners
		can attempt to round.

		The value is comma separated list of html elements
		in lowercase.

		validTags: ["div", "form"]

		The above example would enable curvyCorners on FORM elements.
		*/
		settings = {
		tl: { radius: 2 },
		tr: { radius: 2 },
		bl: { radius: 2 },
		br: { radius: 2 },
		antiAlias: true,
		autoPad: true,
		validTags: ["div", "a", "img"]
		}

		settings2 = {
		tl: { radius: 2 },
		tr: { radius: 2 },
		bl: { radius: 2 },
		br: { radius: 2 },
		antiAlias: true,
		autoPad: false,
		validTags: ["div"]
		}

		settings3 = {
		tl: { radius: 4 },
		tr: { radius: 4 },
		bl: { radius: 4 },
		br: { radius: 4 },
		antiAlias: true,
		autoPad: true,
		validTags: ["div"]
		}

		settings4 = {
		tl: { radius: 10 },
		tr: { radius: 10 },
		bl: { radius: 10 },
		br: { radius: 10 },
		antiAlias: true,
		autoPad: false,
		validTags: ["div"]
		}


		/*
		Usage:

		newCornersObj = new curvyCorners(settingsObj, classNameStr);
		newCornersObj = new curvyCorners(settingsObj, divObj1[, divObj2[, divObj3[, . . . [, divObjN]]]]);
		*/
		var myBoxObject = new curvyCorners(settings, "select");
		myBoxObject.applyCornersToAll();

		var myBoxObject2 = new curvyCorners(settings, "btn02");
		myBoxObject2.applyCornersToAll();
		
		var myBoxObject3 = new curvyCorners(settings, "btn01");
		myBoxObject3.applyCornersToAll();
		
		var myBoxObject4 = new curvyCorners(settings2, "title");
		myBoxObject4.applyCornersToAll();
		
		var myBoxObject4 = new curvyCorners(settings, "boton");
		myBoxObject4.applyCornersToAll();
		
		var myBoxObject5 = new curvyCorners(settings2, "title2");
		myBoxObject5.applyCornersToAll();
		
		var myBoxObject6 = new curvyCorners(settings3, "calendar");
		myBoxObject6.applyCornersToAll();
		
		var myBoxObject7 = new curvyCorners(settings, "btn03");
		myBoxObject7.applyCornersToAll();
		
		var myBoxObject8 = new curvyCorners(settings4, "top_ico");
		myBoxObject8.applyCornersToAll();
		
		var myBoxObject9 = new curvyCorners(settings, "imagen_ficha");
		myBoxObject9.applyCornersToAll();
		
		
   });


   $(function() {
		if($("#date1").length > 0)
			$("#date1").datepicker({showOn: 'button', buttonImage: 'imgs/calendar.png', buttonImageOnly: true, nextText: '>', prevText: '<', minDate: minDate, maxDate: maxDate});
			
		if($("#date2").length > 0)
			$("#date2").datepicker({showOn: 'button', buttonImage: 'imgs/calendar.png', buttonImageOnly: true, nextText: '>', prevText: '<', minDate: minDate, maxDate: maxDate});

		if($("#fecha_hasta").length > 0)
			$("#fecha_hasta").datepicker({showOn: 'button', buttonImage: 'imgs/calendar.png', buttonImageOnly: true, nextText: '>', prevText: '<', minDate: minDate, maxDate: maxDate});
	});
	


