$(document).ready(function(){$('table').wrap('<div class="table-responsive"></div>');$('table').addClass('table table-bordered table-striped table-hover');$('#blog p > img').addClass('img-responsive center-block');$('#blog_content').find('img').addClass('shadow');$('[data-toggle="tooltip"]').tooltip();$('.owl-carousel').owlCarousel({loop:true,autoplay:1000,autoplayHoverPause:true,center:true,margin:10,dots:true,nav:true,responsive:{0:{items:1},600:{items:3},1000:{items:5}}});$(".owl-carousel").each(function(index,el){var containerHeight=$(el).height();$(el).find("img").each(function(index,img){var w=$(img).prop('naturalWidth');var h=$(img).prop('naturalHeight');$(img).css({'height':'250px'});}),$(el).owlCarousel({autoWidth:true});});var $topLinkBlock=$('#top-link-block');$(window).scroll(function(){if($(this).scrollTop()>100){$topLinkBlock.affix({offset:{top:-20}});TweenMax.to($topLinkBlock,0.5,{left:"2.5%",x:0,y:-20});}else{TweenMax.to($topLinkBlock,2.0,{left:"-50%",x:0,y:-20});}});$topLinkBlock.hover(function(){TweenMax.to($(this),0.5,{scale:1.1});},function(){TweenMax.to($(this),0.5,{scale:1.0});});});$(function(){var pathname=location.pathname.split("/")[1]
if(pathname!=""){$('nav a[href^="/'+pathname+'"]').parent().addClass('active');}if(pathname=="blog"){$('nav a[href^="/'+pathname+'/index"]').parent().addClass('active');}});