1jQuery(document).ready(function($) { 2 // PHP vars 3 // home_url 4 // template_directory_uri 5 // retina_logo_url 6 // menu_style 7 // is_front_page 8 9 if( /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) ) { 10 var animated = jQuery('.wpb_appear'); 11 jQuery('html').find(animated).each(function () { 12 jQuery(this).removeClass('wpb_animate_when_almost_visible').removeClass('wpb_appear').removeClass('wpb_start_animation').removeClass('wpb_left-to-right').removeClass('wpb_right-to-left'); 13 }); 14 } 15 16 // retina logo or regular? 17 if (window.devicePixelRatio > 1 && retina_logo_url !== "" ) { 18 console.log(retina_logo_url); 19 jQuery(".logo").attr("src", retina_logo_url); 20 } 21 22 // floating menu or static? 23 if( menu_style == 1 && is_front_page === 'true') { 24 jQuery(window).bind('scroll', function() { 25 if (jQuery(window).scrollTop() > (jQuery(window).height()-20)) { 26 jQuery('.bkaTopmenu').slideDown(200); 27 jQuery(".bkaTopmenu").removeClass('hidden').addClass('displayed'); 28 } 29 if (jQuery(window).scrollTop() < (jQuery(window).height()-20)) { 30 jQuery('.bkaTopmenu').slideUp(200, function() { 31 jQuery(".bkaTopmenu").removeClass('displayed').addClass('hidden'); 32 }); 33 } 34 }); 35 } 36 37 // If menu has sub-menu, submenu appears on hover top menu 38 jQuery('ul.nav li.dropdown, ul.nav li.dropdown-submenu').hover(function() { 39 jQuery(this).find(' > .dropdown-menu').stop(true, true).delay(200).fadeIn(); 40 }, function() { 41 jQuery(this).find(' > .dropdown-menu').stop(true, true).delay(200).fadeOut(); 42 }); 43 44 // Onepage navigation, front page or blog section 45 if(is_front_page==='true') { 46 //console.log('is_front_page'); 47 jQuery('ul.nav a[href*=\\#]').click(function() { 48 //console.log('clicked one'); 49 if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') 50 && location.hostname == this.hostname) { 51 var $target = jQuery(this.hash); 52 var $selector = $target.selector; 53 $target = $target.length && $target 54 || jQuery('[name=' + this.hash.slice(1) +']'); 55 //console.log($selector); 56 if ($target.length && $selector.length > 1) { 57 var targetOffset = $target.offset().top; 58 jQuery('html,body') 59 .animate({scrollTop: targetOffset}, 1000); 60 return false; 61 } 62 } 63 }); 64 65 jQuery('ul.nav a:not(ul.nav a[href*=\\#]):not(a[href^=http])').click(function(){ 66 var currentItem = jQuery(this).attr('href'); 67 window.location = currentItem; 68 return false; 69 }); 70 } else { 71 //console.log('is_NOT_front_page'); 72 jQuery("#mainNavUl li a, .blog_widget ul li.menu-item a").live("click",function(){ 73 var currentItem = jQuery(this).attr('href'); 74 if(jQuery(this).attr('target') == '_blank') { 75 return true; 76 } 77 if(currentItem.charAt(0) == '#' && currentItem.length > 1) { 78 var target = home_url + currentItem; 79 window.location = target; 80 return false; 81 } else { 82 window.location = currentItem; 83 return false; 84 } 85 }); 86 } 87 88 89 var windowWidth = jQuery(window).width(); //retrieve current window width 90 var windowHeight = jQuery(window).height(); //retrieve current window height 91 92 jQuery('.hgrHeaderImage img').width(windowWidth).height(windowHeight); 93 jQuery('.blogPosts').css("min-height",windowHeight); 94 95 jQuery("#pagesContent").css("margin-top", windowHeight); 96 97 jQuery(window).resize(function() { 98 windowWidth = jQuery(window).width(); //retrieve current window width 99 windowHeight = jQuery(window).height(); //retrieve current window height 100 jQuery('.hgrHeaderImage img').width(windowWidth).height(windowHeight); 101 jQuery('.blogPosts').css("min-height",windowHeight); 102 }); 103 104 jQuery(".iconeffect").mouseenter(function(){ 105 jQuery(this).find(".icon").addClass("hoveredIcon"); 106 }).mouseleave(function(){ 107 jQuery(this).find(".icon").removeClass("hoveredIcon"); 108 }) 109 110 111 112 jQuery(".readTheBlogBtn").click(function() { 113 jQuery('html, body').animate({ 114 scrollTop: jQuery("#blogPosts").offset().top 115 }, 1000); 116 }); 117 118 119 // Back to top button 120 jQuery(window).bind("scroll", function() { 121 if (jQuery(window).scrollTop() > jQuery(window).height()) { 122 jQuery('.back-to-top').fadeIn(500); 123 } 124 if (jQuery(window).scrollTop() < jQuery(window).height()) { 125 jQuery('.back-to-top').fadeOut(500); 126 } 127 }); 128 jQuery('.back-to-top').click(function(event) { 129 event.preventDefault(); 130 jQuery('html, body').animate({scrollTop: 0}, 1000); 131 return false;
132 }); 133 134 if(jQuery('#portfolio-items').length != 0) { 135 136 // Portfolio Isotope 137 var container = jQuery('#portfolio-items'); 138 container.isotope({ 139 animationEngine : 'jquery', 140 filter:"*", 141 animationOptions: { 142 duration: 500, 143 queue: false 144 }, 145 layoutMode: 'fitRows' 146 }); 147 jQuery('#filters a').click(function(){ 148 jQuery('#filters li').removeClass('active'); 149 jQuery(this).parent().addClass('active'); 150 var selector = jQuery(this).attr('data-filter'); 151 container.isotope({ filter: selector }); 152 setProjects(); 153 return false; 154 }); 155 function splitColumns() { 156 var winWidth = jQuery(window).width(), 157 columnNumb = 1; 158 if (winWidth > 1024) { 159 columnNumb = 4; 160 } else if (winWidth > 900) { 161 columnNumb = 3; 162 } else if (winWidth > 479) { 163 columnNumb = 2; 164 } else if (winWidth < 479) { 165 columnNumb = 1; 166 } 167 return columnNumb; 168 } 169 function setColumns() { 170 var container = jQuery('#portfolio-items'); 171 var winWidth = jQuery(window).width(), 172 columnNumb = splitColumns(), 173 postWidth = Math.floor(winWidth / columnNumb); 174 175 container.find('.portfolio-item').each(function () { 176 jQuery(this).css( { 177 width : postWidth + 'px' 178 }); 179 }); 180 } 181 function setProjects() { 182 setColumns(); 183 container.isotope('layout'); 184 } 185 container.imagesLoaded(function () { 186 setProjects(); 187 }); 188 jQuery(window).bind('resize', function () { 189 setProjects(); 190 }); 191 setProjects(); 192 } 193 194 195 // closes opened portfolio item 196 jQuery("#itemcontainer-controller").live("click",function(){ 197 parent.history.back(); 198 return false; 199 }); 200 201 // properly render parallax images on mobile 202 jQuery(window).resize(function() { 203 jQuery('.parallax').each(function(){ 204 jQuery(this).css('background-position','center'); 205 }); 206 }); 207 208 if( /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) ) { 209 hgr_forMobile(); 210 } 211 212 function hgr_forMobile(){ 213 jQuery('.parallax').each(function(){ 214 jQuery(this).css({"background-attachment":"scroll"}); 215 }); 216 } 217 218 jQuery('.venoboxvid').venobox(); 219 220 if(is_front_page==='true' && jQuery('.pagesection').length != 0 ) { 221 jQuery('.pagesection').waypoint(function(direction) { 222 //var activeSection = $(this).next(); 223 var activeSection = jQuery(this); 224 if(direction === 'down'){ 225 activeSection = jQuery(this).next(); 226 } 227 //activeSection = $(this); 228 var sectionId = activeSection.attr('id'); 229 jQuery('ul.nav a').removeClass('active'); 230 jQuery('ul.nav a[href*=\\#'+sectionId+']').addClass('active'); 231 //console.log(sectionId); 232 }); 233 } 234 235 /* WOOCOMMERCE */ 236 jQuery('.woocommerce .products li.product').mouseenter(function(){ 237 jQuery(this).find(".add_to_cart_button").css("visibility", "visible"); 238 }).mouseleave(function(){ 239 jQuery(this).find(".add_to_cart_button").css("visibility", "hidden"); 240 }) 241 242});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.