function external() {    $('a[rel="external"]').attr('target', '_blank');}function gotop() {    $('.goTop').click(function () {        $('html,body').animate({ scrollTop: '0px' }, 500); return false;    });}function toHome() {    $('#logo').click(function () {        // $(this).animate({Top:'600px'});        $('.accordian').animate({ top: '428px' });		$('.accordian .acc:first span#birds').animate( { backgroundPosition:'50% 1px'} );		$('.accordian .acc:odd').hide();    });    $('#logo').addClass('cur');}function sliders() {    $('#imagenes').cycle({        timeout: 7000,        speed: 800,        pause: true,        random: true    });    //}function correos() {$('.correo').each(function(i, ele){		var texto = $(this).text().replace('[arroba]', '@').replace('[punto]', '.');		$(this).html('<a href="mailto:'+texto+'">'+texto+'</a>');	});}	function theGallery() {    function formatTitle(title, currentArray, currentIndex, currentOpts) {        var t = title.split(',');        var d = t[1].split('-');        title = '<b>' + t[0] + '</b>,' + d[0];        return '<div id="texto-galeria">' + title + '</div>';    }    $('#fotos a').each(function (i, el) {        $(el).attr({            'rel': 'cartel',            'title': $(el).find('img').attr('alt')        });    }).fancybox({        'overlayColor': '#000',        'overlayOpacity': 0.7,        'padding': 5,        'cyclic': true,        'transitionIn': 'elastic',        'transitionOut': 'elastic',        'titlePosition': 'inside',        'titleFormat': formatTitle    });}function LoadEmailFunction() {    $('#loading').addClass('invisible');    $('#mailok').addClass('invisible');    $('#mailerror').addClass('invisible');    function onSuccess() {        var asunto = $('#Reservas').val();        $('#loading').addClass('visible');        $('#loading').removeClass('invisible');        $.ajax({ url: "http://palomail.pacifica.co/SendEmail.aspx?asunto=" + asunto + '&nombre=' + $('#nombre').val() + '&email=' + $('#email').val() + '&mensaje=' + $('#mensaje').val() + '&telefono=' + $('#telefono').val()            , context: document.body, success: function () {                $('#loading').removeClass('visible');                $('#loading').addClass('invisible');                $('#mailok').addClass('visible');                $('#mailok').removeClass('invisible');                $('#mailerror').addClass('invisible');                $('#mailerror').removeClass('visible');                $('#contact :input').each(function () {                    if (this.type == 'text' || this.type == 'textarea') {                        $(this).val('');                    }                });            }, error: function (e) {                $('#loading').removeClass('visible');                $('#mailerror').removeClass('invisible');                $('#mailerror').addClass('visible');                $('#loading').addClass('invisible');                $('#mailok').addClass('invisible');                $('#mailok').removeClass('visible');            }        });    }    function onError() {    }    $('#boton').click(function (e) {        e.preventDefault();    });    SetTrigger('#boton', '#contact', onError, onSuccess);}$(document).ready(function () {    sliders();    external();    gotop();    toHome();    theGallery();	correos();	LoadEmailFunction();});
