// CSS SWITCHER
jQuery(document).ready(function($) {
// CSS SWITCHER BOX
$("#css_switch_a, #css_box").mouseover(function(){
$("#css_box").css("left", "0");
});
$("#css_box").mouseout(function(){
$("#css_box").css("left", "-185px");
});
// CSS COLORS SWITCHER
$("#css_el_orange").click(function(){
$('head').append(' ');
$('head').append('');
$('head').remove(' ');
$('head').remove('');
$('head').remove(' ');
$('head').remove('');
$('head').remove(' ');
$('head').remove('');
$('head').remove(' ');
$('head').remove('');
$('head').remove(' ');
$('head').remove('');
});
$("#css_el_red").click(function(){
$('head').append(' ');
$('head').append('');
$('head').remove(' ');
$('head').remove('');
$('head').remove(' ');
$('head').remove('');
$('head').remove(' ');
$('head').remove('');
$('head').remove(' ');
$('head').remove('');
$('head').remove(' ');
$('head').remove('');
});
$("#css_el_green").click(function(){
$('head').append(' ');
$('head').append('');
$('head').remove(' ');
$('head').remove('');
$('head').remove(' ');
$('head').remove('');
$('head').remove(' ');
$('head').remove('');
$('head').remove(' ');
$('head').remove('');
$('head').remove(' ');
$('head').remove('');
});
$("#css_el_blue").click(function(){
$('head').append(' ');
$('head').append('');
$('head').remove(' ');
$('head').remove('');
$('head').remove(' ');
$('head').remove('');
$('head').remove(' ');
$('head').remove('');
$('head').remove(' ');
$('head').remove('');
$('head').remove(' ');
$('head').remove('');
});
$("#css_el_beige").click(function(){
$('head').append(' ');
$('head').append('');
$('head').remove(' ');
$('head').remove('');
$('head').remove(' ');
$('head').remove('');
$('head').remove(' ');
$('head').remove('');
$('head').remove(' ');
$('head').remove('');
$('head').remove(' ');
$('head').remove('');
});
$("#css_el_gray").click(function(){
$('head').append(' ');
$('head').append('');
$('head').remove(' ');
$('head').remove('');
$('head').remove(' ');
$('head').remove('');
$('head').remove(' ');
$('head').remove('');
$('head').remove(' ');
$('head').remove('');
$('head').remove(' ');
$('head').remove('');
});
// CSS BOX SWITCHER
$("#css_box_dark").click(function(){
$('head').append(' ');
$('head').remove(' ');
});
$("#css_box_light").click(function(){
$('head').append(' ');
$('head').remove(' ');
});
// CSS BACKGROUND SWITCHER
$("#css_bg_1").click(function(){
$('head').append(' ');
$('head').remove(' ');
$('head').remove(' ');
$('head').remove(' ');
$('head').remove(' ');
$('head').remove(' ');
$('head').remove(' ');
});
$("#css_bg_2").click(function(){
$('head').append(' ');
$('head').remove(' ');
$('head').remove(' ');
$('head').remove(' ');
$('head').remove(' ');
$('head').remove(' ');
$('head').remove(' ');
});
$("#css_bg_3").click(function(){
$('head').append(' ');
$('head').remove(' ');
$('head').remove(' ');
$('head').remove(' ');
$('head').remove(' ');
$('head').remove(' ');
$('head').remove(' ');
});
$("#css_bg_4").click(function(){
$('head').append(' ');
$('head').remove(' ');
$('head').remove(' ');
$('head').remove(' ');
$('head').remove(' ');
$('head').remove(' ');
$('head').remove(' ');
});
$("#css_bg_5").click(function(){
$('head').append(' ');
$('head').remove(' ');
$('head').remove(' ');
$('head').remove(' ');
$('head').remove(' ');
$('head').remove(' ');
$('head').remove(' ');
});
$("#css_bg_6").click(function(){
$('head').append(' ');
$('head').remove(' ');
$('head').remove(' ');
$('head').remove(' ');
$('head').remove(' ');
$('head').remove(' ');
$('head').remove(' ');
});
$("#css_bg_7").click(function(){
$('head').append(' ');
$('head').remove(' ');
$('head').remove(' ');
$('head').remove(' ');
$('head').remove(' ');
$('head').remove(' ');
$('head').remove(' ');
});
});
// DATE PICKER
$(function() {
$( "#make_a_reservation_input_1" ).datepicker();
});
// PRELOADER
jQuery(document).ready(function($) {
// site preloader -- also uncomment the div in the header and the css style for #preloader
$(window).load(function(){
$('#mask').fadeOut('slow',function(){$(this).remove();});
});
});
// BACKGROUND SIZE
$(document).ready(function() {
$('.image-popup-no-margins').magnificPopup({
type: 'image',
closeOnContentClick: true,
closeBtnInside: false,
mainClass: 'mfp-no-margins', // class to remove default margin from left and right side
image: {
verticalFit: true
}
});
});
$(document).ready(function() {
$('.popup-with-zoom-anim').magnificPopup({
type: 'inline',
fixedContentPos: false,
fixedBgPos: true,
overflowY: 'auto',
closeBtnInside: true,
preloader: false,
midClick: true,
removalDelay: 300,
mainClass: 'my-mfp-zoom-in'
});
});
$(function(){
var $container = $('#container');
$('#container').isotope({ filter: '.home' });
$container.isotope({
masonry: {
columnWidth: 240
},
sortBy: 'number',
getSortData: {
number: function( $elem ) {
var number = $elem.hasClass('element') ?
$elem.find('.number').text() :
$elem.attr('data-number');
return parseInt( number, 10 );
},
alphabetical: function( $elem ) {
var name = $elem.find('.name'),
itemText = name.length ? name : $elem;
return itemText.text();
}
}
});
var $optionSets = $('.options .option-set'),
$optionLinks = $optionSets.find('a');
$optionLinks.click(function(){
var $this = $(this);
// don't proceed if already selected
if ( $this.hasClass('selected') ) {
return false;
}
var $optionSet = $this.parents('.option-set');
$optionSet.find('.selected').removeClass('selected');
$this.addClass('selected');
// make option object dynamically, i.e. { filter: '.my-filter-class' }
var options = {},
key = $optionSet.attr('data-option-key'),
value = $this.attr('data-option-value');
// parse 'false' as false boolean
value = value === 'false' ? false : value;
options[ key ] = value;
if ( key === 'layoutMode' && typeof changeLayoutMode === 'function' ) {
// changes in layout modes need extra logic
changeLayoutMode( $this, options )
} else {
// otherwise, apply new options
$container.isotope( options );
}
return false;
});
// HOME THUMB HOVER
$(".photo_thumb").mouseover(function() {
$(this).children(".photo_thumb_hover_1").fadeIn();
});
$(".photo_thumb_hover_1").mouseout(function() {
$(this).fadeOut();
});
// ABOUT US THUMB HOVER
$('.person').hover(
function(){
$(this).children(".about_us_person_hover").addClass("about_us_person_hover_active");
},
function(){
$(this).children(".about_us_person_hover").removeClass("about_us_person_hover_active");
}
);
// FILTERING
$("#filtering_menu_a").click(function() {
$("#filtering_menu_all_a").click();
});
$("#filtering_gallery_a").click(function() {
$("#filtering_gallery_all_a").click();
});
// LIQUID SLIDERS
$('#slider-id').liquidSlider({
autoSlide:true,
autoSlideInterval: 5000,
});
$('#slider-id_2').liquidSlider({
autoSlide:true,
autoSlideInterval: 5000,
});
// SCROLL BAR
$(".nano").nanoScroller({ alwaysVisible: true });
});
// FLEX SLIDERS
$(window).load(function(){
$('.flexslider').flexslider({
animation: "slide",
directionNav: false,
slideshow: true,
slideshowSpeed: 5000,
start: function(slider){
$('body').removeClass('loading');
}
});
});
$(window).load(function(){
$('.flexslider_2').flexslider({
animation: "slide",
controlNav: false,
directionNav: true,
slideshow: true,
slideshowSpeed: 5000,
start: function(slider){
$('body').removeClass('loading');
}
});
});
$(window).load(function(){
$('.flexslider_3').flexslider({
animation: "slide",
controlNav: false,
directionNav: true,
slideshow: true,
slideshowSpeed: 5000,
start: function(slider){
$('body').removeClass('loading');
}
});
});
$(window).load(function(){
$('.flexslider_4').flexslider({
animation: "slide",
controlNav: false,
directionNav: true,
slideshow: true,
slideshowSpeed: 5000,
start: function(slider){
$('body').removeClass('loading');
}
});
});
$(window).load(function(){
$('.flexslider_5').flexslider({
animation: "slide",
controlNav: false,
directionNav: true,
slideshow: true,
slideshowSpeed: 5000,
start: function(slider){
$('body').removeClass('loading');
}
});
});
var opts = {
lines: 7, // The number of lines to draw
length: 0, // The length of each line
width: 30, // The line thickness
radius: 0, // The radius of the inner circle
corners: 0, // Corner roundness (0..1)
rotate: 13, // The rotation offset
direction: 1, // 1: clockwise, -1: counterclockwise
color: '#FFF', // #rgb or #rrggbb
speed: 1.4, // Rounds per second
trail: 42, // Afterglow percentage
shadow: false, // Whether to render a shadow
hwaccel: true, // Whether to use hardware acceleration
className: 'spinner', // The CSS class to assign to the spinner
zIndex: 2e9, // The z-index (defaults to 2000000000)
top: 'auto', // Top position relative to parent in px
left: 'auto' // Left position relative to parent in px
};
var target = document.getElementById('mask');
var spinner = new Spinner(opts).spin(target);