// JavaScript Document

$(document).ready(
        function() {
			$('a').click(
                    function(e) {

                        vinculo = $(this).attr("href");
                        valor_direccion = $(this).attr("target");
                        if (valor_direccion != "_blank") {
                            $(this).attr("target", "_self");
                        }

                        if (vinculo != "#" && vinculo != "#1"
                                && vinculo != "#2" && vinculo != "#3"
                                && vinculo != "#4" && vinculo != "#5"
                                && vinculo != "#6" && vinculo != "#7"
                                && vinculo != "#8" && vinculo != "#9"
                                && vinculo != "#10" && vinculo != "#11"
                                && vinculo != "#12") {

                            e.preventDefault();

                            if (valor_direccion != "_blank") {
                                window.open(vinculo, "_self");
                            } else {
                                window.open(vinculo, "_blank");
                            }

                        } else {
                            if (vinculo != "#1" && vinculo != "#2"
                                    && vinculo != "#3" && vinculo != "#4"
                                    && vinculo != "#5" && vinculo != "#6"
                                    && vinculo != "#7" && vinculo != "#8"
                                    && vinculo != "#9" && vinculo != "#10"
                                    && vinculo != "#11" && vinculo != "#12") {
                                e.preventDefault();
                            }
                        }
                    });
			
			

  			/* Esto aparece en toda la web: PLACEHOLDER DE LOS INPUTS*/

            $(".input_text").focus(function(srcc) {
                if ($(this).val() == $(this)[0].title) {
                    $(this).removeClass("defaultTextActive");
                    $(this).val("");
                }
            });

            $(".input_text").blur(function() {
                if ($(this).val() == "") {
                    $(this).addClass("defaultTextActive");
                    $(this).val($(this)[0].title);
                }
            });

           $(".input_text").blur();
		   

			/* PLACEHOLDER DE LOS TEXTAREAS*/
			
            $(".textarea").focus(function(srcc) {
                if ($(this).val() == $(this)[0].title) {
                    $(this).removeClass("defaultTextActive");
                    $(this).val("");
                }
            });

            $(".textarea").blur(function() {
                if ($(this).val() == "") {
                    $(this).addClass("defaultTextActive");
                    $(this).val($(this)[0].title);
                }
            });

            $(".textarea").blur();

        });

