|
|
|
|
|
|
|
|
jQuery('html,body').animate({ scrollTop: targetOffset }, speed); |
|
|
jQuery('html,body').animate({ scrollTop: targetOffset }, speed); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
//homepage |
|
|
|
|
|
|
|
|
//homepage |
|
|
|
|
|
var headerIsActive = false; |
|
|
|
|
|
|
|
|
// $('.link-expand').on('click', function() |
|
|
|
|
|
// { |
|
|
|
|
|
// $('.dropdown-menu').addClass('active'); |
|
|
|
|
|
|
|
|
$('.service-link').on('click', function() |
|
|
|
|
|
{ |
|
|
|
|
|
$('#servicesMenu').toggle('active'); |
|
|
|
|
|
if(headerIsActive) |
|
|
|
|
|
{ |
|
|
|
|
|
$('#header').removeClass('active_dropdown'); |
|
|
|
|
|
} |
|
|
|
|
|
else |
|
|
|
|
|
{ |
|
|
|
|
|
$('#header').addClass('active_dropdown'); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
// }); |
|
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
$('.industries-link').on('click', function() |
|
|
|
|
|
{ |
|
|
|
|
|
$('#industriesMenu').toggle('active'); |
|
|
|
|
|
if(headerIsActive) |
|
|
|
|
|
{ |
|
|
|
|
|
$('#header').removeClass('active_dropdown'); |
|
|
|
|
|
} |
|
|
|
|
|
else |
|
|
|
|
|
{ |
|
|
|
|
|
$('#header').addClass('active_dropdown'); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//homepage end |
|
|
//homepage end |
|
|
|
|
|
|
|
|
var expand = false; |
|
|
var expand = false; |
|
|
$('.position').on('click', function(ev) { |
|
|
$('.position').on('click', function(ev) { |
|
|
//ev.preventDefault(); |
|
|
//ev.preventDefault(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$(this).find(".chev").toggleClass('chevron--down chevron--up'); |
|
|
$(this).find(".chev").toggleClass('chevron--down chevron--up'); |
|
|
$(this).closest(".position-cont").find(".collapse").toggleClass("show"); |
|
|
$(this).closest(".position-cont").find(".collapse").toggleClass("show"); |
|
|
|
|
|
|
|
|
$(this).toggleClass("active"); //css({"background-color": "#993c95", "color": "white"}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$(this).toggleClass("active"); //css({"background-color": "#993c95", "color": "white"}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
expand= !expand; |
|
|
expand= !expand; |
|
|
}); |
|
|
}); |
|
|
$('.chev').on('click', function(ev) { |
|
|
$('.chev').on('click', function(ev) { |
|
|
//ev.preventDefault(); |
|
|
//ev.preventDefault(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$(this).toggleClass('chevron--down chevron--up'); |
|
|
$(this).toggleClass('chevron--down chevron--up'); |
|
|
$(this).closest(".position-cont").find(".collapse").toggleClass("show"); |
|
|
$(this).closest(".position-cont").find(".collapse").toggleClass("show"); |
|
|
|
|
|
|
|
|
$(this).closest(".position").toggleClass("active"); //css({"background-color": "#993c95", "color": "white"}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$(this).closest(".position").toggleClass("active"); //css({"background-color": "#993c95", "color": "white"}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
expand= !expand; |
|
|
expand= !expand; |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
field: 'text', |
|
|
field: 'text', |
|
|
direction: 'asc' |
|
|
direction: 'asc' |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}); |
|
|
}); |
|
|
} |
|
|
} |
|
|
var resume = ""; |
|
|
var resume = ""; |
|
|
$("input:file").change(function (event){ |
|
|
$("input:file").change(function (event){ |
|
|
var fileName = $(this).val(); |
|
|
var fileName = $(this).val(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var reader = new FileReader(); |
|
|
var reader = new FileReader(); |
|
|
|
|
|
|
|
|
reader.onload = function(e) |
|
|
reader.onload = function(e) |
|
|
{ |
|
|
|
|
|
|
|
|
{ |
|
|
resume = e.target.result; |
|
|
resume = e.target.result; |
|
|
} |
|
|
} |
|
|
reader.readAsDataURL(this.files[0]); |
|
|
reader.readAsDataURL(this.files[0]); |
|
|
|
|
|
|
|
|
fileName="Choose file"; |
|
|
fileName="Choose file"; |
|
|
} |
|
|
} |
|
|
$(".resume-file-cont label").html(fileName); |
|
|
$(".resume-file-cont label").html(fileName); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}); |
|
|
}); |
|
|
$(".btn-delete-file").click(function(e) |
|
|
$(".btn-delete-file").click(function(e) |
|
|
{ |
|
|
{ |
|
|
|
|
|
|
|
|
apply_form.bind('submit', function(ev) { |
|
|
apply_form.bind('submit', function(ev) { |
|
|
ev.preventDefault(); |
|
|
ev.preventDefault(); |
|
|
|
|
|
|
|
|
var resume_file = document.getElementById("resume-file").files[0]; |
|
|
|
|
|
|
|
|
|
|
|
console.log(resume.toString()); |
|
|
|
|
|
|
|
|
var resume_file = document.getElementById("resume-file").files[0]; |
|
|
|
|
|
|
|
|
|
|
|
console.log(resume.toString()); |
|
|
var data = new FormData(document.getElementById("apply-form")); |
|
|
var data = new FormData(document.getElementById("apply-form")); |
|
|
data.append("resume", "'" + resume + "'"); |
|
|
data.append("resume", "'" + resume + "'"); |
|
|
data.append("resume-file", resume_file); |
|
|
data.append("resume-file", resume_file); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$.ajax({ |
|
|
$.ajax({ |
|
|
url: "job_apply.php?call=upload", |
|
|
url: "job_apply.php?call=upload", |
|
|
method: "POST", |
|
|
method: "POST", |
|
|
|
|
|
|
|
|
console.log(data) |
|
|
console.log(data) |
|
|
$(".apply-msg").addClass("active"); |
|
|
$(".apply-msg").addClass("active"); |
|
|
}, |
|
|
}, |
|
|
error: function(error) |
|
|
|
|
|
|
|
|
error: function(error) |
|
|
{ |
|
|
{ |
|
|
console.log(console.error); |
|
|
console.log(console.error); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
//apply end |
|
|
//apply end |
|
|
//contact form |
|
|
|
|
|
|
|
|
//contact form |
|
|
|
|
|
|
|
|
var form = document.getElementById("contact-form"); |
|
|
var form = document.getElementById("contact-form"); |
|
|
var button = jQuery("#contact-form #submit"); |
|
|
var button = jQuery("#contact-form #submit"); |
|
|
|
|
|
|
|
|
form.append(xhr.response); |
|
|
form.append(xhr.response); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
button.on("submit", function(ev) |
|
|
|
|
|
{ |
|
|
|
|
|
|
|
|
button.on("submit", function(ev) |
|
|
|
|
|
{ |
|
|
var data = new FormData(form); |
|
|
var data = new FormData(form); |
|
|
ajax(form.method, form.action, data, success, error); |
|
|
ajax(form.method, form.action, data, success, error); |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
if (xhr.readyState !== XMLHttpRequest.DONE) return; |
|
|
if (xhr.readyState !== XMLHttpRequest.DONE) return; |
|
|
if (xhr.status === 200) { |
|
|
if (xhr.status === 200) { |
|
|
success(); |
|
|
success(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} else { |
|
|
} else { |
|
|
error(); |
|
|
error(); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
//end contact form |
|
|
//end contact form |
|
|
// $('#contact-wrap').waypoint(function() { |
|
|
// $('#contact-wrap').waypoint(function() { |
|
|
// animate(); |
|
|
// animate(); |
|
|
// }); |
|
|
|
|
|
|
|
|
// }); |
|
|
//nikola |
|
|
//nikola |
|
|
|
|
|
|
|
|
$('.clear_storage').on('click', function(e){ |
|
|
$('.clear_storage').on('click', function(e){ |
|
|
|
|
|
|
|
|
{ |
|
|
{ |
|
|
scrollToID(null, get_id, 300); |
|
|
scrollToID(null, get_id, 300); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
jQuery(document).ready(function() |
|
|
jQuery(document).ready(function() |
|
|
{ |
|
|
{ |
|
|
var loc = window.location; |
|
|
var loc = window.location; |
|
|
|
|
|
|
|
|
console.log(id); |
|
|
console.log(id); |
|
|
var nav_link = "#navigation ."+ id +" > a"; |
|
|
var nav_link = "#navigation ."+ id +" > a"; |
|
|
console.log(item); |
|
|
console.log(item); |
|
|
var item = $(nav_link); |
|
|
|
|
|
|
|
|
var item = $(nav_link); |
|
|
console.log(item); |
|
|
console.log(item); |
|
|
item.trigger('click'); |
|
|
item.trigger('click'); |
|
|
//localStorage.setItem('pg_id', id); |
|
|
//localStorage.setItem('pg_id', id); |
|
|
|
|
|
|
|
|
}); |
|
|
}); |
|
|
$("#back-to-top").on('click', function() |
|
|
$("#back-to-top").on('click', function() |
|
|
{ |
|
|
{ |
|
|
$(window).scrollTop(0); |
|
|
|
|
|
|
|
|
$(window).scrollTop(0); |
|
|
$(this).removeClass('active'); |
|
|
$(this).removeClass('active'); |
|
|
}); |
|
|
}); |
|
|
// click event to scroll to div |
|
|
// click event to scroll to div |
|
|
//section link in nav which refer to section on homepage |
|
|
|
|
|
|
|
|
//section link in nav which refer to section on homepage |
|
|
$('.home_link').on('click', function(e){ |
|
|
$('.home_link').on('click', function(e){ |
|
|
e.preventDefault(); |
|
|
e.preventDefault(); |
|
|
var id = '#'+$(this).data('id'); |
|
|
var id = '#'+$(this).data('id'); |
|
|
localStorage.setItem('pg_id', id); |
|
|
localStorage.setItem('pg_id', id); |
|
|
var url = $(this).attr("href"); |
|
|
var url = $(this).attr("href"); |
|
|
scrollToID(url, id, 300); |
|
|
scrollToID(url, id, 300); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}); |
|
|
//Link from our partners section on homepage which refer to section on portfolio page |
|
|
//Link from our partners section on homepage which refer to section on portfolio page |
|
|
$('.partners_link').on('click', function(e){ |
|
|
$('.partners_link').on('click', function(e){ |
|
|
e.preventDefault(); |
|
|
e.preventDefault(); |
|
|
|
|
|
|
|
|
localStorage.setItem('pg_id', id); |
|
|
localStorage.setItem('pg_id', id); |
|
|
var url = $(this).attr("href"); |
|
|
var url = $(this).attr("href"); |
|
|
scrollToID(url, id, 300); |
|
|
scrollToID(url, id, 300); |
|
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var siteUrl = window.location.hash; |
|
|
var siteUrl = window.location.hash; |
|
|
window.addEventListener('scroll', function(e) { |
|
|
window.addEventListener('scroll', function(e) { |
|
|
if($( document ).width() <= 768) |
|
|
if($( document ).width() <= 768) |
|
|
|
|
|
|
|
|
{ |
|
|
{ |
|
|
$("#back-to-top").removeClass("active"); |
|
|
$("#back-to-top").removeClass("active"); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var loc = window.location; |
|
|
var loc = window.location; |
|
|
if(loc.pathname.substring(loc.pathname.lastIndexOf('/') + 1, loc.pathname.length) == 'index.html') |
|
|
if(loc.pathname.substring(loc.pathname.lastIndexOf('/') + 1, loc.pathname.length) == 'index.html') |
|
|
{ |
|
|
{ |
|
|
var newUrl = ""; |
|
|
var newUrl = ""; |
|
|
if( isOnScreen( $( '#intro-section' ) ) ) { /* Pass element id/class you want to check */ |
|
|
if( isOnScreen( $( '#intro-section' ) ) ) { /* Pass element id/class you want to check */ |
|
|
$("nav li.active").removeClass("active").find('.nav-active-mark').remove(); |
|
|
$("nav li.active").removeClass("active").find('.nav-active-mark').remove(); |
|
|
$("nav li.intro-section").addClass("active").append('<span class="nav-active-mark"></span>'); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$("nav li.intro-section").addClass("active").append('<span class="nav-active-mark"></span>'); |
|
|
|
|
|
|
|
|
//newUrl = siteUrl.substring(0, siteUrl.indexOf("/")); |
|
|
//newUrl = siteUrl.substring(0, siteUrl.indexOf("/")); |
|
|
parent.location.hash = "?section=intro"; |
|
|
parent.location.hash = "?section=intro"; |
|
|
} |
|
|
} |
|
|
if( isOnScreen( $( '#about-section' ) ) ) { /* Pass element id/class you want to check */ |
|
|
if( isOnScreen( $( '#about-section' ) ) ) { /* Pass element id/class you want to check */ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$("nav li.active").removeClass("active").find('.nav-active-mark').remove(); |
|
|
$("nav li.active").removeClass("active").find('.nav-active-mark').remove(); |
|
|
$("nav li.about-section").addClass("active").append('<span class="nav-active-mark"></span>'); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$("nav li.about-section").addClass("active").append('<span class="nav-active-mark"></span>'); |
|
|
|
|
|
|
|
|
//newUrl = siteUrl.substring(0, siteUrl.lastIndexOf("/") -1) + "about-wrap"; |
|
|
//newUrl = siteUrl.substring(0, siteUrl.lastIndexOf("/") -1) + "about-wrap"; |
|
|
parent.location.hash = "?section=about"; |
|
|
parent.location.hash = "?section=about"; |
|
|
//console.log(siteUrl.substring(0, siteUrl.lastIndexOf("/"))); |
|
|
//console.log(siteUrl.substring(0, siteUrl.lastIndexOf("/"))); |
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
if( isOnScreen( $( '#our_partners-section' ) ) ) { /* Pass element id/class you want to check */ |
|
|
if( isOnScreen( $( '#our_partners-section' ) ) ) { /* Pass element id/class you want to check */ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$("nav li.active").removeClass("active").find('.nav-active-mark').remove(); |
|
|
$("nav li.active").removeClass("active").find('.nav-active-mark').remove(); |
|
|
$("nav li.our_partners-section").addClass("active").append('<span class="nav-active-mark"></span>'); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$("nav li.our_partners-section").addClass("active").append('<span class="nav-active-mark"></span>'); |
|
|
|
|
|
|
|
|
//newUrl = siteUrl.substring(0, siteUrl.lastIndexOf("/") -1) + "our_partners-wrap"; |
|
|
//newUrl = siteUrl.substring(0, siteUrl.lastIndexOf("/") -1) + "our_partners-wrap"; |
|
|
parent.location.hash = "?section=our_partners"; |
|
|
parent.location.hash = "?section=our_partners"; |
|
|
} |
|
|
} |
|
|
if( isOnScreen( $( '#services-section' ) ) ) { /* Pass element id/class you want to check */ |
|
|
if( isOnScreen( $( '#services-section' ) ) ) { /* Pass element id/class you want to check */ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$("nav li.active").removeClass("active").find('.nav-active-mark').remove(); |
|
|
$("nav li.active").removeClass("active").find('.nav-active-mark').remove(); |
|
|
$("nav li.services-section").addClass("active").append('<span class="nav-active-mark"></span>'); |
|
|
|
|
|
|
|
|
$("nav li.services-section").addClass("active").append('<span class="nav-active-mark"></span>'); |
|
|
|
|
|
|
|
|
//newUrl = siteUrl.substring(0, siteUrl.lastIndexOf("/") -1) + "services"; |
|
|
//newUrl = siteUrl.substring(0, siteUrl.lastIndexOf("/") -1) + "services"; |
|
|
parent.location.hash = "?section=services"; |
|
|
parent.location.hash = "?section=services"; |
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
if( isOnScreen( $( '#teams-wrap' ) ) ) { /* Pass element id/class you want to check */ |
|
|
if( isOnScreen( $( '#teams-wrap' ) ) ) { /* Pass element id/class you want to check */ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$("nav li.active").removeClass("active").find('.nav-active-mark').remove(); |
|
|
$("nav li.active").removeClass("active").find('.nav-active-mark').remove(); |
|
|
$("nav li.teams-wrap").addClass("active").append('<span class="nav-active-mark"></span>'); |
|
|
$("nav li.teams-wrap").addClass("active").append('<span class="nav-active-mark"></span>'); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
parent.location.hash = "?section=teams" |
|
|
parent.location.hash = "?section=teams" |
|
|
} |
|
|
} |
|
|
if( isOnScreen( $( '#contact-section' ) ) ) { /* Pass element id/class you want to check */ |
|
|
if( isOnScreen( $( '#contact-section' ) ) ) { /* Pass element id/class you want to check */ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$("nav li.active").removeClass("active").find('.nav-active-mark').remove(); |
|
|
$("nav li.active").removeClass("active").find('.nav-active-mark').remove(); |
|
|
$("nav li.contact-section").addClass("active").append('<span class="nav-active-mark"></span>'); |
|
|
|
|
|
|
|
|
$("nav li.contact-section").addClass("active").append('<span class="nav-active-mark"></span>'); |
|
|
|
|
|
|
|
|
//newUrl = siteUrl.substring(0, siteUrl.lastIndexOf("/") -1) + "contact-wrap"; |
|
|
//newUrl = siteUrl.substring(0, siteUrl.lastIndexOf("/") -1) + "contact-wrap"; |
|
|
parent.location.hash = "?section=contact" |
|
|
parent.location.hash = "?section=contact" |
|
|
} |
|
|
} |
|
|
//history.pushState({}, null, newUrl); |
|
|
//history.pushState({}, null, newUrl); |
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
//nikola |
|
|
//nikola |
|
|
|
|
|
|
|
|
offset: 100 |
|
|
offset: 100 |
|
|
} |
|
|
} |
|
|
); |
|
|
); |
|
|
wow.init(); |
|
|
|
|
|
|
|
|
wow.init(); |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var logoHeight = $('#logo img').height(); |
|
|
var logoHeight = $('#logo img').height(); |
|
|
$('#logo img').attr("src", "images/[email protected]"); |
|
|
$('#logo img').attr("src", "images/[email protected]"); |
|
|
$('#logo img').css({ 'width': logoWidth , 'height': logoHeight }); |
|
|
$('#logo img').css({ 'width': logoWidth , 'height': logoHeight }); |
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
/*========== Team Item Hover ==========*/ |
|
|
/*========== Team Item Hover ==========*/ |
|
|
$('.team-item').each(function(){ |
|
|
$('.team-item').each(function(){ |
|
|
|
|
|
|
|
|
$(this).find('.gallery-info').stop(true,true).animate({ "top": "-999" } ); |
|
|
$(this).find('.gallery-info').stop(true,true).animate({ "top": "-999" } ); |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*========== Pie Chart ==========*/ |
|
|
/*========== Pie Chart ==========*/ |
|
|
$('.days').waypoint(function() { |
|
|
|
|
|
|
|
|
$('.days').waypoint(function() { |
|
|
$('.chart').easyPieChart({ |
|
|
$('.chart').easyPieChart({ |
|
|
easing: 'easeOutBounce', |
|
|
easing: 'easeOutBounce', |
|
|
barColor: '#f3b202', |
|
|
barColor: '#f3b202', |
|
|
|
|
|
|
|
|
$(this.el).find('.percent').text(Math.round(percent)); |
|
|
$(this.el).find('.percent').text(Math.round(percent)); |
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
/*========== Smooth Scroll ==========*/ |
|
|
/*========== Smooth Scroll ==========*/ |
|
|
$('a[href*=#]:not([href=#])').click(function() { |
|
|
$('a[href*=#]:not([href=#])').click(function() { |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*========== Graph Bars Animate ==========*/ |
|
|
/*========== Graph Bars Animate ==========*/ |
|
|
$('.days').waypoint(function() { |
|
|
$('.days').waypoint(function() { |
|
|
$('.graph ul li.bar').each(function() { |
|
|
$('.graph ul li.bar').each(function() { |
|
|
|
|
|
|
|
|
$(this).find('.note-tooltip').fadeOut(); |
|
|
$(this).find('.note-tooltip').fadeOut(); |
|
|
}); |
|
|
}); |
|
|
*/ |
|
|
*/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*========== PrettyPhoto ==========*/ |
|
|
/*========== PrettyPhoto ==========*/ |
|
|
$("a[data-rel^='prettyPhoto']").prettyPhoto({theme:'dark_rounded', hook: 'data-rel'}); |
|
|
$("a[data-rel^='prettyPhoto']").prettyPhoto({theme:'dark_rounded', hook: 'data-rel'}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var flickrImageSrc = [ ]; |
|
|
var flickrImageSrc = [ ]; |
|
|
var flickrLink = [ ]; |
|
|
var flickrLink = [ ]; |
|
|
$('.flickr_badge_image').each(function(i){ |
|
|
$('.flickr_badge_image').each(function(i){ |
|
|
flickrImageSrc[i] = $(this).find('img').attr('src'); |
|
|
|
|
|
flickrLink[i] = $(this).find('a').attr('href'); |
|
|
|
|
|
|
|
|
flickrImageSrc[i] = $(this).find('img').attr('src'); |
|
|
|
|
|
flickrLink[i] = $(this).find('a').attr('href'); |
|
|
}); |
|
|
}); |
|
|
$('.flickr-item').each(function(i){ |
|
|
$('.flickr-item').each(function(i){ |
|
|
$(this).find('.hex-area').css('background-image', 'url(' + flickrImageSrc[i] + ')'); |
|
|
$(this).find('.hex-area').css('background-image', 'url(' + flickrImageSrc[i] + ')'); |
|
|
$(this).find('.flickr-link').attr('href', flickrLink[i] ); |
|
|
$(this).find('.flickr-link').attr('href', flickrLink[i] ); |
|
|
}); |
|
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
/*========== Window Resize ==========*/ |
|
|
/*========== Window Resize ==========*/ |
|
|
var windowWidth = $(window).width(); |
|
|
var windowWidth = $(window).width(); |
|
|
|
|
|
|
|
|
$(".mobile-nav-toggle").addClass('deactive'); |
|
|
$(".mobile-nav-toggle").addClass('deactive'); |
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*========== Contact Form Validation ==========*/ |
|
|
/*========== Contact Form Validation ==========*/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function isValidEmailAddress(emailAddress) { |
|
|
function isValidEmailAddress(emailAddress) { |
|
|
var pattern = new RegExp(/^(("[\w-\s]+")|([\w-]+(?:\.[\w-]+)*)|("[\w-\s]+")([\w-]+(?:\.[\w-]+)*))(@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$)|(@\[?((25[0-5]\.|2[0-4][0-9]\.|1[0-9]{2}\.|[0-9]{1,2}\.))((25[0-5]|2[0-4][0-9]|1[0-9]{2}|[0-9]{1,2})\.){2}(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[0-9]{1,2})\]?$)/i); |
|
|
var pattern = new RegExp(/^(("[\w-\s]+")|([\w-]+(?:\.[\w-]+)*)|("[\w-\s]+")([\w-]+(?:\.[\w-]+)*))(@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$)|(@\[?((25[0-5]\.|2[0-4][0-9]\.|1[0-9]{2}\.|[0-9]{1,2}\.))((25[0-5]|2[0-4][0-9]|1[0-9]{2}|[0-9]{1,2})\.){2}(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[0-9]{1,2})\]?$)/i); |
|
|
return pattern.test(emailAddress); |
|
|
return pattern.test(emailAddress); |
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
// $('.contact-form form').submit(function() { |
|
|
// $('.contact-form form').submit(function() { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// var hasError = false; |
|
|
// var hasError = false; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// var comment = $('#message-txt').val(); |
|
|
// var comment = $('#message-txt').val(); |
|
|
// if ($.trim(comment) == '') { |
|
|
// if ($.trim(comment) == '') { |
|
|
// $('#message-txt').addClass('error'); |
|
|
// $('#message-txt').addClass('error'); |
|
|
|
|
|
|
|
|
// } |
|
|
// } |
|
|
// else { |
|
|
// else { |
|
|
// $('#subject-txt').removeClass('error'); |
|
|
// $('#subject-txt').removeClass('error'); |
|
|
// } |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// } |
|
|
|
|
|
|
|
|
// var emailVal = $('#email-txt').val(); |
|
|
// var emailVal = $('#email-txt').val(); |
|
|
// if ($.trim(emailVal) == '' || !isValidEmailAddress(emailVal)) { |
|
|
// if ($.trim(emailVal) == '' || !isValidEmailAddress(emailVal)) { |
|
|
// $('#email-txt').addClass('error'); |
|
|
// $('#email-txt').addClass('error'); |
|
|
|
|
|
|
|
|
// else { |
|
|
// else { |
|
|
// $('#email-txt').removeClass('error'); |
|
|
// $('#email-txt').removeClass('error'); |
|
|
// } |
|
|
// } |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// var name = $('#name-txt').val(); |
|
|
// var name = $('#name-txt').val(); |
|
|
// if ($.trim(name) == '') { |
|
|
// if ($.trim(name) == '') { |
|
|
// $('#name-txt').addClass('error'); |
|
|
// $('#name-txt').addClass('error'); |
|
|
// $('#name-txt').focus(); |
|
|
// $('#name-txt').focus(); |
|
|
// hasError = true; |
|
|
// hasError = true; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// } |
|
|
// } |
|
|
// else { |
|
|
// else { |
|
|
// $('#name-txt').removeClass('error'); |
|
|
// $('#name-txt').removeClass('error'); |
|
|
// } |
|
|
// } |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// if (!hasError) { |
|
|
// if (!hasError) { |
|
|
// $('#submit').fadeOut('normal', function(){ |
|
|
// $('#submit').fadeOut('normal', function(){ |
|
|
// $('.loading').css({ |
|
|
// $('.loading').css({ |
|
|
// display: "block" |
|
|
// display: "block" |
|
|
// }); |
|
|
// }); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// }); |
|
|
// }); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// // $.post($('.contact-form form').attr('action'), $('.contact-form form').serialize(), function(data){ |
|
|
// // $.post($('.contact-form form').attr('action'), $('.contact-form form').serialize(), function(data){ |
|
|
// // $('.log').html(data); |
|
|
// // $('.log').html(data); |
|
|
// // $('.loading').remove(); |
|
|
// // $('.loading').remove(); |
|
|
// // $('.contact-form form').slideUp('slow'); |
|
|
// // $('.contact-form form').slideUp('slow'); |
|
|
// // }); |
|
|
// // }); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// } |
|
|
// } |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// return false; |
|
|
// return false; |
|
|
|
|
|
|
|
|
// }); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// }); |
|
|
/*========== FlexSlider ==========*/ |
|
|
/*========== FlexSlider ==========*/ |
|
|
$('.flexslider').flexslider({ |
|
|
$('.flexslider').flexslider({ |
|
|
animation: "fade", |
|
|
animation: "fade", |