You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
78 lines
2.2 KiB
78 lines
2.2 KiB
|
|
$(document).ready(function(){
|
|
|
|
var cbHeight = '98%';
|
|
var cbWidth = '98%';
|
|
|
|
if($(window).width() >= 1024){
|
|
cbHeight = '80%';
|
|
cbWidth = '60%';
|
|
}
|
|
|
|
$('.cboxElementPhoto').colorbox({height: cbHeight, transition: 'elastic', close: ''});
|
|
$('.cboxElement').colorbox({height: cbHeight, width: cbWidth, transition: 'elastic', close: '',iframe: true});
|
|
$('#contact-form, #register-form, #reset-form').on('submit', function(event) {
|
|
$.colorbox({width: cbWidth, height: cbHeight,transition: 'elastic', close: '', iframe: true, href:$(this).attr('action')+"?" + $(this).serialize()});
|
|
event.preventDefault();
|
|
});
|
|
|
|
var isHome = $('body').hasClass('is-home');
|
|
|
|
if($(window).width() < 1024 && $(window).width() >= 768){
|
|
$('#menuRight .banner').clone().appendTo('#menuLeft');
|
|
$('#menuRight').empty();
|
|
}
|
|
|
|
if($(window).width() < 1024){
|
|
if(!isHome){
|
|
$('html, body').animate({scrollTop: $('#MainContainer').offset().top - 74});
|
|
}
|
|
}
|
|
|
|
if($(window).width() >= 768){
|
|
$('#menuLeft .dropdown:first-child').addClass('active');
|
|
}
|
|
|
|
|
|
|
|
$('.hamburger').on('click', function(){
|
|
$(this).toggleClass('is-active');
|
|
|
|
if($(this).hasClass('is-active')){
|
|
$('.topmenu').fadeIn();
|
|
$('html, body').css({overflow: 'hidden'});
|
|
}else{
|
|
$('.topmenu').fadeOut();
|
|
$('html, body').css({overflow: 'auto'});
|
|
}
|
|
});
|
|
|
|
|
|
$('.dropdown .title').on('click', function(){
|
|
|
|
$(this).parent().toggleClass('active');
|
|
|
|
if($(this).parent().hasClass('active') && !$(this).parent().hasClass('static')){
|
|
$('html, body').animate({
|
|
scrollTop: $(this).parent().offset().top
|
|
},500);
|
|
}
|
|
|
|
});
|
|
|
|
$('#news-find').on('submit', function(e){
|
|
e.preventDefault();
|
|
window.location = "/news/0/find/" + $('#news-find').find('.q').val();
|
|
});
|
|
|
|
|
|
$('.items-list .item .more .more-title').on('click', function(){
|
|
if($(this).siblings('.more-content').is(':visible')){
|
|
$(this).siblings('.more-content').stop().slideUp();
|
|
}else{
|
|
$(this).siblings('.more-content').stop().slideDown();
|
|
}
|
|
});
|
|
|
|
|
|
});
|