1jQuery(document).ready(function($) { 2 jQuery( ".wpb_portfolio_post" ).each(function(i, e) { 3 var text_content = $(e).find(".wpb_fp_quick_view_content .pf-content").html(); 4 if(!text_content){ 5 text_content = $(e).next().find(".wpb_fp_quick_view_content .pf-content").html(); 6 } 7 $(e).find(".wpb_fp_icons").after(text_content); 8 }); 9 $('figcaption').click(function(e){ 10 var anchor = $(this).find('div > p:nth-child(3) a'); 11 if(anchor.length != 0){ 12 window.open(anchor.attr('href'), '_blank'); 13 } 14 }) 15 if(readCookie('fontsize') != '') { 16 var fontsize = readCookie('fontsize'); 17 document.body.style.fontSize = fontsize; 18 } 19 if(readCookie('constract') != '') { 20 var className = readCookie('constract'); 21 document.body.className += ' ' + className; 22 } 23 24 if($('body').width() >= 768) { 25 $('.desktop-search-icon').click(function(){ 26 $('.web-access ul').hide(); 27 $('.search-form-container .search-form').toggleClass('active'); 28 }); 29 30 $('.info-title').click(function(){ 31 $('.info-content').toggle(); 32 $('.information').toggleClass('active'); 33 }); 34 } else { 35 $('.info-title').click(function(){ 36 $(this).siblings('.info-content').toggle(); 37 var height = $('.information .row').height(); 38 $('.information').css('height', height + 20); 39 }); 40 } 41 42 $('.sponsor-imagemap').rwdImageMaps(); 43 44 $('.web-access button').click(function(){ 45 $('.search-form-container .search-form').removeClass('active'); 46 $('.web-access ul').toggle(); 47 }); 48 49 $('.web-access .font-container a').click(function(e){ 50 e.preventDefault(); 51 var clicked = $(this).data('clicked'); 52 if(clicked == 'true') { 53 return; 54 } else { 55 $(this).siblings('a').data('clicked', false); 56 $(this).data('clicked', 'true'); 57 } 58 59 var size = $(this).data('size'); 60 61 resizeText(size); 62 }); 63 64 $(window).click(function(e) { 65 var container = $(".web-access button"); 66 if (!container.is(e.target) 67 && container.has(e.target).length === 0) 68 { 69 $('.web-access ul').hide(); 70 } 71 }); 72 73 $('.close-nav').click(function(){ 74 $('.menu-toggle').click(); 75 return false; 76 }); 77 78 $('li.contrast img').click(function(e) { 79 e.preventDefault(); 80 var className = $(this).attr('class'); 81 $('body').removeClass('black-on-yellow yellow-on-black default').addClass(className); 82 createCookie('constract',className,1); 83 }); 84 85 var defaultFontSize = '1.2em'; 86 var resizeText = function(multiplier) { 87 if (document.body.style.fontSize == "") { 88 document.body.style.fontSize = defaultFontSize; 89 } 90 91 var newSize = multiplier == 0 ? defaultFontSize : parseFloat(document.body.style.fontSize) + (multiplier * 0.4) + "em"; 92 if(multiplier == 0) { 93 document.body.style.fontSize = newSize; 94 } else { 95 document.body.style.fontSize = newSize; 96 } 97 createCookie(fontsize,newSize,1); 98 }; 99 100 $('.sidebar-container aside.widget').each(function(index, item){ 101 if($(item).text().trim() == '') { 102 $(item).remove(); 103 } 104 }); 105 106 /* Menu */ 107 $('.menu-main-menu-container .menu-item-has-children .collapse-icon').click(function(e){ 108 $(this).siblings('.sub-menu').toggleClass('active'); 109 $(this).toggleClass('up'); 110 }); 111 112 //Tracking 113 114 $('.info-item').click(function(){ 115 ga('send', 'event', { eventCategory: 'Frontpage', eventAction: 'Information', eventLabel: 'Information'}); 116 }); 117 118 $('.booking-email').click(function(){ 119 ga('send', 'event', { eventCategory: 'Skoletjenester', eventAction: 'Email', eventLabel: 'Email'}); 120 }); 121 122 $('#wpcf7-f10721-p9541-o1 .wpcf7-submit').click(function(){ 123 ga('send', 'event', { eventCategory: 'Meeting Room', eventAction: 'Contact Form', eventLabel: 'Contact Form'}); 124 });
125 126 $('.widget_wysija .wysija-submit').click(function(){ 127 ga('send', 'event', { eventCategory: 'Newsletter', eventAction: 'Signup', eventLabel: 'Signup'}); 128 }); 129 130}); 131 132/* GLOBAL FUNCTIONS*/ 133function createCookie(name,value,days) { 134 if (days) { 135 var date = new Date(); 136 date.setTime(date.getTime()+(days*24*60*60*1000)); 137 var expires = "; expires="+date.toGMTString(); 138 } 139 else var expires = ""; 140 document.cookie = name+"="+value+expires+"; path=/"; 141} 142 143function readCookie(name) { 144 var nameEQ = name + "="; 145 var ca = document.cookie.split(';'); 146 for(var i=0;i < ca.length;i++) { 147 var c = ca[i]; 148 while (c.charAt(0)==' ') c = c.substring(1,c.length); 149 if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length); 150 } 151 return null; 152} 153 154function eraseCookie(name) { 155 createCookie(name,"",-1); 156}
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.