').addClass(settings.dotsClass).appendTo(this.$element)).addClass('disabled');
this._controls.$absolute.on('click', 'div', $.proxy(function(e){
var index=$(e.target).parent().is(this._controls.$absolute)
? $(e.target).index():$(e.target).parent().index();
e.preventDefault();
this.to(index, settings.dotsSpeed);
}, this));
for (override in this._overrides){
this._core[override]=$.proxy(this[override], this);
}};
Navigation.prototype.destroy=function(){
var handler, control, property, override;
for (handler in this._handlers){
this.$element.off(handler, this._handlers[handler]);
}
for (control in this._controls){
this._controls[control].remove();
}
for (override in this.overides){
this._core[override]=this._overrides[override];
}
for (property in Object.getOwnPropertyNames(this)){
typeof this[property]!='function'&&(this[property]=null);
}};
Navigation.prototype.update=function(){
var i, j, k,
lower=this._core.clones().length / 2,
upper=lower + this._core.items().length,
maximum=this._core.maximum(true),
settings=this._core.settings,
size=settings.center||settings.autoWidth||settings.dotsData
? 1:settings.dotsEach||settings.items;
if(settings.slideBy!=='page'){
settings.slideBy=Math.min(settings.slideBy, settings.items);
}
if(settings.dots||settings.slideBy=='page'){
this._pages=[];
for (i=lower, j=0, k=0; i < upper; i++){
if(j >=size||j===0){
this._pages.push({
start: Math.min(maximum, i - lower),
end: i - lower + size - 1
});
if(Math.min(maximum, i - lower)===maximum){
break;
}
j=0, ++k;
}
j +=this._core.mergers(this._core.relative(i));
}}
};
Navigation.prototype.draw=function(){
var difference,
settings=this._core.settings,
disabled=this._core.items().length <=settings.items,
index=this._core.relative(this._core.current()),
loop=settings.loop||settings.rewind;
this._controls.$relative.toggleClass('disabled', !settings.nav||disabled);
if(settings.nav){
this._controls.$previous.toggleClass('disabled', !loop&&index <=this._core.minimum(true));
this._controls.$next.toggleClass('disabled', !loop&&index >=this._core.maximum(true));
}
this._controls.$absolute.toggleClass('disabled', !settings.dots||disabled);
if(settings.dots){
difference=this._pages.length - this._controls.$absolute.children().length;
if(settings.dotsData&&difference!==0){
this._controls.$absolute.html(this._templates.join(''));
}else if(difference > 0){
this._controls.$absolute.append(new Array(difference + 1).join(this._templates[0]));
}else if(difference < 0){
this._controls.$absolute.children().slice(difference).remove();
}
this._controls.$absolute.find('.active').removeClass('active');
this._controls.$absolute.children().eq($.inArray(this.current(), this._pages)).addClass('active');
}};
Navigation.prototype.onTrigger=function(event){
var settings=this._core.settings;
event.page={
index: $.inArray(this.current(), this._pages),
count: this._pages.length,
size: settings&&(settings.center||settings.autoWidth||settings.dotsData
? 1:settings.dotsEach||settings.items)
};};
Navigation.prototype.current=function(){
var current=this._core.relative(this._core.current());
return $.grep(this._pages, $.proxy(function(page, index){
return page.start <=current&&page.end >=current;
}, this)).pop();
};
Navigation.prototype.getPosition=function(successor){
var position, length,
settings=this._core.settings;
if(settings.slideBy=='page'){
position=$.inArray(this.current(), this._pages);
length=this._pages.length;
successor ? ++position:--position;
position=this._pages[((position % length) + length) % length].start;
}else{
position=this._core.relative(this._core.current());
length=this._core.items().length;
successor ? position +=settings.slideBy:position -=settings.slideBy;
}
return position;
};
Navigation.prototype.next=function(speed){
$.proxy(this._overrides.to, this._core)(this.getPosition(true), speed);
};
Navigation.prototype.prev=function(speed){
$.proxy(this._overrides.to, this._core)(this.getPosition(false), speed);
};
Navigation.prototype.to=function(position, speed, standard){
var length;
if(!standard&&this._pages.length){
length=this._pages.length;
$.proxy(this._overrides.to, this._core)(this._pages[((position % length) + length) % length].start, speed);
}else{
$.proxy(this._overrides.to, this._core)(position, speed);
}};
$.fn.owlCarousel.Constructor.Plugins.Navigation=Navigation;
})(window.Zepto||window.jQuery, window, document);
;(function($, window, document, undefined){
'use strict';
var Hash=function(carousel){
this._core=carousel;
this._hashes={};
this.$element=this._core.$element;
this._handlers={
'initialized.owl.carousel': $.proxy(function(e){
if(e.namespace&&this._core.settings.startPosition==='URLHash'){
$(window).trigger('hashchange.owl.navigation');
}}, this),
'prepared.owl.carousel': $.proxy(function(e){
if(e.namespace){
var hash=$(e.content).find('[data-hash]').addBack('[data-hash]').attr('data-hash');
if(!hash){
return;
}
this._hashes[hash]=e.content;
}}, this),
'changed.owl.carousel': $.proxy(function(e){
if(e.namespace&&e.property.name==='position'){
var current=this._core.items(this._core.relative(this._core.current())),
hash=$.map(this._hashes, function(item, hash){
return item===current ? hash:null;
}).join();
if(!hash||window.location.hash.slice(1)===hash){
return;
}
window.location.hash=hash;
}}, this)
};
this._core.options=$.extend({}, Hash.Defaults, this._core.options);
this.$element.on(this._handlers);
$(window).on('hashchange.owl.navigation', $.proxy(function(e){
var hash=window.location.hash.substring(1),
items=this._core.$stage.children(),
position=this._hashes[hash]&&items.index(this._hashes[hash]);
if(position===undefined||position===this._core.current()){
return;
}
this._core.to(this._core.relative(position), false, true);
}, this));
};
Hash.Defaults={
URLhashListener: false
};
Hash.prototype.destroy=function(){
var handler, property;
$(window).off('hashchange.owl.navigation');
for (handler in this._handlers){
this._core.$element.off(handler, this._handlers[handler]);
}
for (property in Object.getOwnPropertyNames(this)){
typeof this[property]!='function'&&(this[property]=null);
}};
$.fn.owlCarousel.Constructor.Plugins.Hash=Hash;
})(window.Zepto||window.jQuery, window, document);
;(function($, window, document, undefined){
var style=$('
').get(0).style,
prefixes='Webkit Moz O ms'.split(' '),
events={
transition: {
end: {
WebkitTransition: 'webkitTransitionEnd',
MozTransition: 'transitionend',
OTransition: 'oTransitionEnd',
transition: 'transitionend'
}},
animation: {
end: {
WebkitAnimation: 'webkitAnimationEnd',
MozAnimation: 'animationend',
OAnimation: 'oAnimationEnd',
animation: 'animationend'
}}
},
tests={
csstransforms: function(){
return !!test('transform');
},
csstransforms3d: function(){
return !!test('perspective');
},
csstransitions: function(){
return !!test('transition');
},
cssanimations: function(){
return !!test('animation');
}};
function test(property, prefixed){
var result=false,
upper=property.charAt(0).toUpperCase() + property.slice(1);
$.each((property + ' ' + prefixes.join(upper + ' ') + upper).split(' '), function(i, property){
if(style[property]!==undefined){
result=prefixed ? property:true;
return false;
}});
return result;
}
function prefixed(property){
return test(property, true);
}
if(tests.csstransitions()){
$.support.transition=new String(prefixed('transition'))
$.support.transition.end=events.transition.end[ $.support.transition ];
}
if(tests.cssanimations()){
$.support.animation=new String(prefixed('animation'))
$.support.animation.end=events.animation.end[ $.support.animation ];
}
if(tests.csstransforms()){
$.support.transform=new String(prefixed('transform'));
$.support.transform3d=tests.csstransforms3d();
}})(window.Zepto||window.jQuery, window, document);
(function($){
function IsEmail($email){
var emailReg=/^([\w-\.]+@([\w-]+\.)+[\w-]{2,4})?$/;
return emailReg.test($email);
}
jQuery("form.contact-form #submit").click(function(){
var obj=jQuery(this).parents(".contact-form");
var Name=obj.find("input#name").val();
var Email=obj.find("input#email").val();
var Message=obj.find("textarea#message").val();
var sendto=obj.find("input#sendto").val();
var notice=obj.find(".noticefailed");
if(!notice.length){
obj.append('');
notice=obj.find(".noticefailed");
}
notice.text("");
if(Name===''){
notice.html(onetone_params.i18n.i3);
return false;
}
if(!IsEmail(Email)){
notice.html(onetone_params.i18n.i2);
return false;
}
if(Message===''){
notice.html(onetone_params.i18n.i4);
return false;
}
notice.html("");
notice.append("");
jQuery.ajax({
type:"POST",
dataType:"json",
url:onetone_params.ajaxurl,
data:{'Name':Name,'Email':Email,'Message':Message,'sendto':sendto,'action':'onetone_contact'},
success:function(data){
if(data.error==0){
notice.addClass("noticesuccess").removeClass("noticefailed");
obj.find(".noticesuccess").html(data.msg);
}else{
notice.html(data.msg);
}
jQuery('.loading').remove();obj[0].reset();
},
error:function(){
notice.html("Error.");
obj.find('.loading').remove();
}});
});
$(".site-navbar,.home-navbar").click(function(){
$(".top-nav").toggle();
});
$('.top-nav ul li').hover(function(){
$(this).find('ul:first').slideDown(100);
$(this).addClass("hover");
},function(){
$(this).find('ul').css('display','none');
$(this).removeClass("hover");
});
$('.top-nav li ul li:has(ul)').find("a:first").append(" ");
var windowWidth=$(window).width();
if(windowWidth > 939){
if($(".site-main .sidebar").height() > $(".site-main .main-content").height()){
$(".site-main .main-content").css("height",($(".site-main .sidebar").height()+140)+"px");
}}else{
$(".site-main .main-content").css("height","auto");
}
$(window).resize(function(){
var windowWidth=$(window).width();
if(windowWidth > 939){
if($(".site-main .sidebar").height() > $(".site-main .main-content").height()){
$(".site-main .main-content").css("height",($(".site-main .sidebar").height()+140)+"px");
}}else{
$(".site-main .main-content").css("height","auto");
}
if(windowWidth > 919){
$(".top-nav").show();
}else{
$(".top-nav").hide();
}});
})(jQuery);
jQuery(document).ready(function($){
var adminbarHeight=function(){
var stickyTop;
if($("body.admin-bar").length){
if($(window).width() < 765){
stickyTop=46;
}else{
stickyTop=32;
}}else{
stickyTop=0;
}
return stickyTop;
}
var is_rtl=false;
var stickyTop;
if(onetone_params.is_rtl=='1')
is_rtl=true;
stickyTop=adminbarHeight();
if($("section.homepage-slider .item").length >1){
if(onetone_params.slide_fullheight=='1'&&$(window).width() > 1024){
$('section.homepage-slider').height($(window).height()-stickyTop);
$('section.homepage-slider .item').height($(window).height()-stickyTop);
}
$("#onetone-owl-slider").owlCarousel({
nav:onetone_params.slider_control=='1'?true:false,
dots:onetone_params.slider_pagination=='1'?true:false,
slideSpeed:300,
items:1,
autoplay:onetone_params.slide_autoplay=='1'?true:false,
margin:0,
rtl: is_rtl,
loop:true,
paginationSpeed:400,
singleItem:true,
autoplayTimeout:parseInt(onetone_params.slideSpeed)
});
}
if($(".onetone-related-posts").length){
$(".onetone-related-posts").owlCarousel({
navigation:false,
pagination: false,
loop:false,
items:4,
slideSpeed:300,
paginationSpeed:400,
margin:15,
rtl: is_rtl,
singleItem:false,
responsive:{
320:{
items:1,
nav:false
},
768:{
items:2,
nav:false
},
992:{
items:3,
nav:false
},
1200:{
items:4,
nav:false,
}}
});
}
if($("section.homepage-slider .item").length==1){
$("section.homepage-slider .owl-carousel").show();
}
$(".site-nav-toggle").click(function(){
$(".site-nav").toggle();
$('.main-header')
.toggleClass('menu-expanded');
$('.fxd-header')
.toggleClass('menu-expanded');
});
$('.menu-item-has-children > ul').before('');
$(document).on('click', "span.menu-item-toggle",function(e){
$(this).siblings('ul').toggle();
$(this).closest('li').toggleClass('opened');
});
if(window.devicePixelRatio > 1){
if($('.normal_logo').length&&$('.retina_logo').length){
$('.normal_logo').hide();
$('.retina_logo').show();
}
$('.page-title-bar').addClass('page-title-bar-retina');
}
var myPlayer;
$(function (){
myPlayer=$("#onetone-youtube-video").YTPlayer();
$("#onetone-youtube-video").on("YTPReady",function(e){
$(".video-section,.video-section section").css('background', 'none');
$(".video-section").parent('section.section').css('background', 'none');
$("#video-controls").show();
});
});
$(window).scroll(function(){
if($(window).scrollTop() > 200){
$("#back-to-top").fadeIn(200);
}else{
$("#back-to-top").fadeOut(200);
}});
$('#back-to-top, .back-to-top').click(function(){
$('html, body').animate({ scrollTop:0 }, '800');
return false;
});
$('.onetone-parallax').parallax("50%", 0.1);
if($('.parallax-scrolling').length){
$('.parallax-scrolling').parallax({speed:0.15});
}
$(window).scroll(function(){
var scrollTop=$(window).scrollTop();
if($('div.fxd-header').length){
if(scrollTop > 0){
$('.fxd-header').css({'top':stickyTop}).show();
$('header').addClass('fixed-header');
}else{
$('.fxd-header').hide();
$('header').removeClass('fixed-header');
}}
});
$(document).on('click', "a.scroll,.onetone-nav a[href^='#'],.onetone-menuitem a[href^='#']",function(e){
if($(window).width() <=919){
$(".site-nav")
.css('display', 'none');
$('.main-header')
.removeClass('menu-expanded');
$('.fxd-header')
.removeClass('menu-expanded');
}
var selectorHeight=0;
if($('.fxd-header').length)
var selectorHeight=$('.fxd-header').outerHeight();
var scrollTop=$(window).scrollTop();
e.preventDefault();
var id=$(this).attr('href');
if(typeof $(id).offset()!=='undefined'){
var goTo=$(id).offset().top - selectorHeight - stickyTop + 1;
$("html, body").animate({ scrollTop: goTo }, 1000);
}});
$('header .site-nav ul,ul.onetone-dots').onePageNav({filter: 'a[href^="#"]',scrollThreshold:0.3});
$("div.page a[href^='#'],div.post a[href^='#'],div.home-wrapper a[href^='#'],.banner-scroll a[href^='#'],a.banner-scroll[href^='#']").on('click', function(e){
var selectorHeight=$('header').height();
var scrollTop=$(window).scrollTop();
e.preventDefault();
var id=$(this).attr('href');
if(typeof $(id).offset()!=='undefined'){
var goTo=$(id).offset().top - selectorHeight;
$("html, body").animate({ scrollTop: goTo }, 1000);
}});
if(onetone_params.enable_image_lightbox==='1')
$("a[rel^='onetone-portfolio-image']").prettyPhoto();
var gallery_counter=1;
$('.gallery')
.each(function(index, el){
$(this).find('.gallery-item a')
.attr('rel', 'prettyPhoto[pp_gal' + gallery_counter + ']');
gallery_counter++;
});
$(".gallery .gallery-item a").prettyPhoto({animation_speed:'fast',slideshow:10000, hideflash: true});
if($(window).width() <1200){
newPercentage=(($(window).width() / 1200) * 100) + "%";
$(".home-banner .heading-inner").css({"font-size": newPercentage});
}
$(window).on("resize", function (){
if($(window).width() <1200){
newPercentage=(($(window).width() / 1200) * 100) + "%";
$(".home-banner .heading-inner").css({"font-size": newPercentage});
}else{
$(".home-banner .heading-inner").css({"font-size": "100%"});
}});
var win_height=$(window).height();
$("section.fullheight").each(function(){
var section_height=$(this).height();
$(this).css({'height':section_height,'min-height':win_height});
});
$('.onetone-animated').each(function(){
if($(this).data('imageanimation')==="yes"){
$(this).find("img,i.fa").css("visibility","hidden");
}else{
$(this).css("visibility","hidden");
}});
if($('.onetone-animated').length&&$(window).height() > $('.onetone-animated:first').offset().top){
onetone_animation($('.onetone-animated:first'));
}
var mageeCounter=function(){
$('.magee-counter-box').each(function(){
if($(this).find('.counter-num').text()==='0'){
mageeCounter();
}else{
setTimeout(function (){
$(this).find('.counter-num').counterUp({
delay: 10,
time: 10
});
}, 500);
}});
}
mageeCounter();
});
function onetone_animation(e){
e.css({'visibility':'visible'});
e.find("img,i.fa").css({'visibility':'visible'});
var animation_type=e.data('animationtype');
var animation_duration=e.data('animationduration');
var image_animation=e.data('imageanimation');
if(image_animation==="yes"){
e.find("img,i.fa").addClass("animated "+animation_type);
if(animation_duration){
e.find("img,i.fa").css('-moz-animation-duration', animation_duration+'s');
e.find("img,i.fa").css('-webkit-animation-duration', animation_duration+'s');
e.find("img,i.fa").css('-ms-animation-duration', animation_duration+'s');
e.find("img,i.fa").css('-o-animation-duration', animation_duration+'s');
e.find("img,i.fa").css('animation-duration', animation_duration+'s');
}}else{
e.addClass("animated "+animation_type);
if(animation_duration){
e.css('-moz-animation-duration', animation_duration+'s');
e.css('-webkit-animation-duration', animation_duration+'s');
e.css('-ms-animation-duration', animation_duration+'s');
e.css('-o-animation-duration', animation_duration+'s');
e.css('animation-duration', animation_duration+'s');
}}
}
var animated=false;
jQuery(window).scroll(function (){
if(jQuery().waypoint&&animated==false){
jQuery('.onetone-animated').waypoint(function(){
onetone_animation(jQuery(this.element));
},{ triggerOnce: true, offset: '90%' });
}
animated=true;
});
(function(e,h,l,c){e.fn.sonar=function(o,n){if(typeof o==="boolean"){n=o;o=c}return e.sonar(this[0],o,n)};var f=l.body,a="scrollin",m="scrollout",b=function(r,n,t){if(r){f||(f=l.body);var s=r,u=0,v=f.offsetHeight,o=h.innerHeight||l.documentElement.clientHeight||f.clientHeight||0,q=l.documentElement.scrollTop||h.pageYOffset||f.scrollTop||0,p=r.offsetHeight||0;if(!r.sonarElemTop||r.sonarBodyHeight!==v){if(s.offsetParent){do{u+=s.offsetTop}while(s=s.offsetParent)}r.sonarElemTop=u;r.sonarBodyHeight=v}n=n===c?0:n;return(!(r.sonarElemTop+(t?0:p)q+o+n))}},d={},j=0,i=function(){setTimeout(function(){var s,o,t,q,p,r,n;for(t in d){o=d[t];for(r=0,n=o.length;r