123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315 |
- jQuery(function ($) {
- "use strict";
-
-
-
-
-
-
- $(window).on('load', function () {
- $('#preloader').fadeOut(700);
- });
-
-
-
-
-
- $("#post-thumb, #gallery-post").slick({
- infinite: true,
- arrows: false,
- autoplay: true,
- autoplaySpeed: 4000
-
- });
-
- $("#features").slick({
- infinite: true,
- arrows: false,
- autoplay: true,
- autoplaySpeed: 4000
- });
-
-
-
-
- $('.image-popup').magnificPopup({
- type: 'image',
- removalDelay: 160,
- callbacks: {
- beforeOpen: function () {
-
- 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,
- fixedContentPos: false,
- fixedBgPos: true
- });
-
-
-
-
- var mixer = mixitup('.portfolio-items-wrapper');
-
-
-
-
-
-
- $("#testimonials").slick({
- infinite: true,
- arrows: false,
- autoplay: true,
- autoplaySpeed: 4000
- });
-
-
-
-
-
-
-
-
-
-
- $('#contact-submit').click(function (e) {
-
-
- e.preventDefault();
-
-
-
- var error = false;
- var name = $('#name').val();
- var email = $('#email').val();
- var subject = $('#subject').val();
- var message = $('#message').val();
-
-
-
- if (name.length == 0) {
- var error = true;
- $('#name').css("border-color", "#D8000C");
- } else {
- $('#name').css("border-color", "#666");
- }
- if (email.length == 0 || email.indexOf('@') == '-1') {
- var error = true;
- $('#email').css("border-color", "#D8000C");
- } else {
- $('#email').css("border-color", "#666");
- }
- if (subject.length == 0) {
- var error = true;
- $('#subject').css("border-color", "#D8000C");
- } else {
- $('#subject').css("border-color", "#666");
- }
- if (message.length == 0) {
- var error = true;
- $('#message').css("border-color", "#D8000C");
- } else {
- $('#message').css("border-color", "#666");
- }
-
-
- if (error == false) {
-
-
- $('#contact-submit').attr({
- 'disabled': 'false',
- 'value': 'Sending...'
- });
-
-
-
- $.post("sendmail.php", $("#contact-form").serialize(), function (result) {
-
- if (result == 'sent') {
-
- $('#cf-submit').remove();
-
- $('#mail-success').fadeIn(500);
- } else {
-
- $('#mail-fail').fadeIn(500);
-
- $('#contact-submit').removeAttr('disabled').attr('value', 'Send The Message');
- }
- });
- }
- });
-
- });
-
-
-
-
-
-
- var wow = new WOW({
- offset: 100,
- mobile: false
- });
-
-
- var scrolled = false;
- $(window).on('scroll', function() {
- if (!scrolled) {
- scrolled = true;
- wow.init();
- }
- })
-
-
-
-
- function initialize() {
-
- var latitude = $('#map-canvas').attr('data-latitude');
- var longitude = $('#map-canvas').attr('data-longitude');
- var myLatLng = new google.maps.LatLng(latitude, longitude);
-
- var roadAtlasStyles = [{
- "featureType": "landscape",
- "elementType": "geometry.fill",
- "stylers": [{
- "color": "#2F3238"
- }]
- }, {
- "elementType": "labels.text.fill",
- "stylers": [{
- "color": "#FFFFFF"
- }]
- }, {
- "elementType": "labels.text.stroke",
- "stylers": [{
- "visibility": "off"
- }]
- }, {
- "featureType": "road",
- "elementType": "geometry.fill",
- "stylers": [{
- "color": "#50525f"
- }]
- }, {
- "featureType": "road",
- "elementType": "geometry.stroke",
- "stylers": [{
- "visibility": "on"
- }, {
- "color": "#808080"
- }]
- }, {
- "featureType": "poi",
- "elementType": "labels",
- "stylers": [{
- "visibility": "off"
- }]
- }, {
- "featureType": "transit",
- "elementType": "labels.icon",
- "stylers": [{
- "visibility": "off"
- }]
- }, {
- "featureType": "poi",
- "elementType": "geometry",
- "stylers": [{
- "color": "#808080"
- }]
- }, {
- "featureType": "water",
- "elementType": "geometry.fill",
- "stylers": [{
- "color": "#3071a7"
- }, {
- "saturation": -65
- }]
- }, {
- "featureType": "road",
- "elementType": "labels.icon",
- "stylers": [{
- "visibility": "off"
- }]
- }, {
- "featureType": "landscape",
- "elementType": "geometry.stroke",
- "stylers": [{
- "color": "#bbbbbb"
- }]
- }];
-
- var mapOptions = {
- zoom: 14,
- center: myLatLng,
- disableDefaultUI: true,
- scrollwheel: false,
- navigationControl: false,
- mapTypeControl: false,
- scaleControl: false,
- draggable: false,
- mapTypeControlOptions: {
- mapTypeIds: [google.maps.MapTypeId.ROADMAP, 'roadatlas']
- }
- };
-
- var map = new google.maps.Map(document.getElementById('map-canvas'), mapOptions);
-
-
- var marker = new google.maps.Marker({
- position: myLatLng,
- map: map,
- title: '',
- });
-
-
- google.maps.event.addListener(marker, 'click', function () {
- infowindow.open(map, marker);
- });
-
- var styledMapOptions = {
- name: 'US Road Atlas'
- };
-
- var usRoadMapType = new google.maps.StyledMapType(
- roadAtlasStyles, styledMapOptions);
-
- map.mapTypes.set('roadatlas', usRoadMapType);
- map.setMapTypeId('roadatlas');
- }
-
- google.maps.event.addDomListener(window, "load", initialize);
-
-
-
- function changeValue(elementName, newValue){
- document.getElementsByName(elementName)[0].value=newValue;
- };
-
-
-
- $(document).ready(function() {
- $('form').submit(function() {
- if ($('input[type="text"]#e-mail').val().length > 0) {
- $('form').attr('action', '/');
- return false;
- }
- });
- });
|