| Server IP : 20.75.53.88 / Your IP : 216.73.217.72 [ Web Server : Apache System : Linux VMRALP-3 4.4.0-256-generic #290~14.04.1-Ubuntu SMP Thu Jun 20 09:24:50 UTC 2024 x86_64 User : www-data ( 33) PHP Version : 5.5.9-1ubuntu4.29+esm15 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority, Domains : 3 Domains MySQL : ON | cURL : OFF | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /var/www/html/portais/cmhorizonte/assets/js/ |
Upload File : |
$(document).ready(function () {
"use strict";
/* -------------------------------------------------------------------------*
* GO TO TOP
* -------------------------------------------------------------------------*/
$.scrollUp();
/* -------------------------------------------------------------------------*
* MODAL BOXES & POP UP WINDOWS OR IMAGES
* -------------------------------------------------------------------------*/
$('.open-popup-link').magnificPopup({
removalDelay: 500, //delay removal by X to allow out-animation
callbacks: {
beforeOpen: function () {
this.st.mainClass = this.st.el.attr('data-effect');
}
},
midClick: true // allow opening popup on middle mouse click. Always set it to true if you don't provide alternative source.
});
$('#image-popups').magnificPopup({
delegate: 'a',
type: 'image',
removalDelay: 500, //delay removal by X to allow out-animation
callbacks: {
beforeOpen: function () {
// just a hack that adds mfp-anim class to markup
this.st.image.markup = this.st.image.markup.replace(
'mfp-figure', 'mfp-figure mfp-with-anim');
this.st.mainClass = this.st.el.attr('data-effect');
}
},
closeOnContentClick: true,
midClick: true // allow opening popup on middle mouse click. Always set it to true if you don't provide alternative source.
});
$('.popup-youtube, .popup-vimeo, .popup-gmaps').magnificPopup({
disableOn: 700,
type: 'iframe',
mainClass: 'mfp-fade',
removalDelay: 160,
preloader: true,
fixedContentPos: false
});
$('.popup-img').magnificPopup({
type: 'image'
});
// This will create a single gallery from all elements that have class "gallery-item"
$('.gallery-item').magnificPopup({
type: 'image',
gallery: {
enabled: true
}
});
/* -------------------------------------------------------------------------*
* MASONRY
* -------------------------------------------------------------------------*/
var $container = $('.grid').masonry({
itemSelector: '.masonry-item',
});
/* -------------------------------------------------------------------------*
* MASONRY BLOG LINK NUDGING
* -------------------------------------------------------------------------*/
$('.masonry-item a.more').hover(function () { //mouse in
$(this).animate({
paddingLeft: '30px'
}, 400);
}, function () { //mouse out
$(this).animate({
paddingLeft: 15
}, 400);
});
/* -------------------------------------------------------------------------*
* SCROLL BAR
* -------------------------------------------------------------------------*/
//var seq = 0;
//$("html").niceScroll({
// styler: "fb",
// cursorcolor: "#879ccd"
//});
//$(window).load(function () {
// setTimeout(function () {
// $("#gmbox div").animate({
// 'top': 60
// }, 1500, "easeOutElastic");
// }, 1500);
//});
/* -------------------------------------------------------------------------*
* WOW ANIMATION
* -------------------------------------------------------------------------*/
new WOW().init();
/* -------------------------------------------------------------------------*
* CALENDAR
* -------------------------------------------------------------------------*/
$('.single').pickmeup({
flat: true
});
/* -------------------------------------------------------------------------*
* SETTING DATE AND TIME
* -------------------------------------------------------------------------*/
var datetime = null, date = null, dia = null, mes = null;
var update = function () {
date = moment(new Date())
switch (date.format('d')) {
case '0':
dia = 'Domingo';
break;
case '1':
dia = 'Segunda';
break;
case '2':
dia = 'Terça';
break;
case '3':
dia = 'Quarta';
break;
case '4':
dia = 'Quinta';
break;
case '5':
dia = 'Sexta';
break;
case '6':
dia = 'Sábado';
break;
}
switch (date.format('M')) {
case '1':
mes = 'Janeiro';
break;
case '2':
mes = 'Fevereiro';
break;
case '3':
mes = 'Março';
break;
case '4':
mes = 'Abril';
break;
case '5':
mes = 'Maio';
break;
case '6':
mes = 'Junho';
break;
case '7':
mes = 'Julho';
break;
case '8':
mes = 'Agosto';
break;
case '9':
mes = 'Setembro';
break;
case '10':
mes = 'Outubro';
break;
case '11':
mes = 'Novembro';
break;
case '12':
mes = 'Dezembro';
break;
}
datetime.html(dia + ', ' + date.format('D') + ' de ' + mes + ' de ' + date.format('YYYY, hh:mm:ss a'));
};
datetime = $('#time-date')
update();
setInterval(update, 1000);
/* -------------------------------------------------------------------------*
* SEARCH BAR
* -------------------------------------------------------------------------*/
// Hide search wrap by default;
$(".search-container").hide();
$(".toggle-search").on("click", function (e) {
// Prevent default link behavior
e.preventDefault();
// Stop propagation
e.stopPropagation();
// Toggle search-wrap
$(".search-container").slideToggle(500, function () {
// Focus on the search bar
// When animation is complete
$("#search-bar").focus();
});
});
// Close the search bar if user clicks anywhere
$(document).click(function (e) {
var searchWrap = $(".search-container");
if (!searchWrap.is(e.target) && searchWrap.has(e.target).length ===
0) {
searchWrap.slideUp(500);
}
});
/* -------------------------------------------------------------------------*
* ADDING SLIDE UP AND ANIMATION TO DROPDOWN
* -------------------------------------------------------------------------*/
enquire.register("screen and (min-width:767px)", {
match: function () {
$(".dropdown").hover(function () {
$('.dropdown-menu', this).stop().fadeIn("slow");
}, function () {
$('.dropdown-menu', this).stop().fadeOut("slow");
});
},
});
/* -------------------------------------------------------------------------*
* DROPDOWN LINK NUDGING
* -------------------------------------------------------------------------*/
$('.dropdown-menu a').hover(function () { //mouse in
$(this).animate({
paddingLeft: '30px'
}, 400);
}, function () { //mouse out
$(this).animate({
paddingLeft: 20
}, 400);
});
/* -------------------------------------------------------------------------*
* STICKY NAVIGATION
* -------------------------------------------------------------------------*/
$(window).scroll(function () {
if ($(window).scrollTop() >= 99) {
$('.nav-search-outer').addClass('navbar-fixed-top');
}
if ($(window).scrollTop() >= 100) {
$('.nav-search-outer').addClass('show');
} else {
$('.nav-search-outer').removeClass('show navbar-fixed-top');
}
});
/* -------------------------------------------------------------------------*
* HOT NEWS
* -------------------------------------------------------------------------*/
//$('#js-news').ticker();
//// hide the release history when the page loads
//$('#release-wrapper').css('margin-top', '-' + ($('#release-wrapper').height() +
// 20) + 'px');
//// show/hide the release history on click
//$('a[href="#release-history"]').toggle(function () {
// $('#release-wrapper').animate({
// marginTop: '0px'
// }, 600, 'linear');
//}, function () {
// $('#release-wrapper').animate({
// marginTop: '-' + ($('#release-wrapper').height() + 20) +
// 'px'
// }, 600, 'linear');
//});
//$('#download a').mousedown(function () {
// _gaq.push(['_trackEvent', 'download-button', 'clicked'])
//});
});
/* -------------------------------------------------------------------------*
* WEATHER
* -------------------------------------------------------------------------*/
$.simpleWeather({
location: '',
woeid: '453330',
unit: 'c',
success: function (weather) {
html = '<i class="icon-' + weather.code + '"></i> ' + weather.city +
', ' + weather.region + ' ' + weather.temp + '°' +
weather.units.temp + ' ';
$("#weather").html(html);
switch (weather.code) {
case '0':
condition = 'Tornado';
break;
case '1':
condition = 'Tempestade Tropical';
break;
case '2':
condition = 'Furacão';
break;
case '3':
condition = 'Tempestade Severa';
break;
case '4':
condition = 'Trovoadas';
break;
case '5':
condition = 'Chuva e Neve';
break;
case '6':
condition = 'Chuva e Granizo Fino';
break;
case '7':
condition = 'Neve e Granizo Fino';
break;
case '8':
condition = 'Garoa Gélida';
break;
case '9':
condition = 'Garoa';
break;
case '10':
condition = 'Chuva Gélida';
break;
case '11':
condition = 'Chuvisco';
break;
case '12':
condition = 'Chuva';
break;
case '13':
condition = 'Neve em Flocos Finos';
break;
case '14':
condition = 'Leve Precipitação de Neve';
break;
case '15':
condition = 'Ventos com Neve';
break;
case '16':
condition = 'Neve';
break;
case '17':
condition = 'Chuva de Granizo';
break;
case '18':
condition = 'Pouco Granizo';
break;
case '19':
condition = 'Pó em Suspensão';
break;
case '20':
condition = 'Neblina';
break;
case '21':
condition = 'Névoa Seca';
break;
case '22':
condition = 'Enfumaçado';
break;
case '23':
condition = 'Vendaval';
break;
case '24':
condition = 'Ventando';
break;
case '25':
condition = 'Frio';
break;
case '26':
condition = 'Nublado';
break;
case '27':
condition = 'Muitas Nuvens';
break;
case '28':
condition = 'Muitas Nuvens';
break;
case '29':
condition = 'Parcialmente Nublado';
break;
case '30':
condition = 'Parcialmente Nublado';
break;
case '31':
condition = 'Céu Limpo';
break;
case '32':
condition = 'Ensolarado';
break;
case '33':
condition = 'Tempo Bom';
break;
case '34':
condition = 'Tempo Bom';
break;
case '35':
condition = 'Chuva e Granizo';
break;
case '36':
condition = 'Quente';
break;
case '37':
condition = 'Tempestades Isoladas';
break;
case '38':
condition = 'Tempestades Esparsas';
break;
case '39':
condition = 'Tempestades Esparsas';
break;
case '40':
condition = 'Chuvas Esparsas';
break;
case '41':
condition = 'Nevasca';
break;
case '42':
condition = 'Tempestades de Neve Esparsas';
break;
case '43':
condition = 'Nevasca';
break;
case '44':
condition = 'Parcialmente Nublado';
break;
case '45':
condition = 'Chuva com Trovoadas';
break;
case '46':
condition = 'Tempestade de Neve';
break;
case '47':
condition = 'Relâmpagos e Chuvas Isoladas';
break;
default:
condition = weather.currently;
break;
}
html = '<div id="tempo" style="background: url(' + weather.image + ');">' +
'<span class="tempo_cidade">' + weather.city + ', ' + weather.region + '</span>' +
'<span class="tempo_grau">' + weather.temp + '°' + weather.units.temp + '</span>' +
'<span class="tempo_descricao">' + condition + '</span>' +
'</div>';
$("#weather-sidebar").html(html);
},
error: function (error) {
$("#weather").html('<p>' + error + '</p>');
}
});