1/** 2 * jQuery.browser.mobile (http://detectmobilebrowser.com/) 3 * 4 * jQuery.browser.mobile will be true if the browser is a mobile device 5 * 6 **/ 7(function(a){(jQuery.browser2=jQuery.browser2||{}).mobile=/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(a)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(a.substr(0,4))})(navigator.userAgent||navigator.vendor||window.opera); 8 9/*! 10 * jQuery Browser Plugin v0.0.2 11 * https://github.com/gabceb/jquery-browser-plugin 12 * 13 * Original jquery-browser code Copyright 2005, 2013 jQuery Foundation, Inc. and other contributors 14 * http://jquery.org/license 15 * 16 * Modifications Copyright 2013 Gabriel Cebrian 17 * https://github.com/gabceb 18 * 19 * Released under the MIT license 20 * 21 * Date: 2013-07-29T17:23:27-07:00 22 */ 23 24(function( jQuery, window, undefined ) { 25"use strict"; 26 27var matched, browser; 28 29jQuery.uaMatch = function( ua ) { 30 ua = ua.toLowerCase(); 31 32 var match = /(opr)[\/]([\w.]+)/.exec( ua ) || 33 /(chrome)[ \/]([\w.]+)/.exec( ua ) || 34 /(webkit)[ \/]([\w.]+)/.exec( ua ) || 35 /(opera)(?:.*version|)[ \/]([\w.]+)/.exec( ua ) || 36 /(msie) ([\w.]+)/.exec( ua ) || 37 ua.indexOf("trident") >= 0 && /(rv)(?::| )([\w.]+)/.exec( ua ) || 38 ua.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec( ua ) || 39 []; 40 41 var platform_match = /(ipad)/.exec( ua ) || 42 /(iphone)/.exec( ua ) || 43 /(android)/.exec( ua ) || 44 []; 45 46 return { 47 browser: match[ 1 ] || "", 48 version: match[ 2 ] || "0", 49 platform: platform_match[0] || "" 50 }; 51}; 52 53matched = jQuery.uaMatch( window.navigator.userAgent ); 54browser = {}; 55 56if ( matched.browser ) { 57 browser[ matched.browser ] = true; 58 browser.version = matched.version; 59} 60 61if ( matched.platform) { 62 browser[ matched.platform ] = true 63} 64 65// Chrome and Opera 15+ are Webkit, but Webkit is also Safari. 66if ( browser.chrome || browser.opr) { 67 browser.webkit = true; 68} else if ( browser.webkit ) { 69 browser.safari = true; 70} 71 72// IE11 has a new token so we will assign it msie to avoid breaking changes 73if (browser.rv) 74{ 75 browser.msie = true; 76} 77 78// Opera 15+ are identified as opr 79if (browser.opr) 80{ 81 browser.opera = true; 82} 83 84jQuery.browser = browser; 85 86})( jQuery, window ); 87 88//*** THE ABOVE WAS INCLUDED TO MAKE THE FOLLOWING CODE COMPATIBLE WITH JQUERY 1.9.1 ***// 89 90var toploc = '' 91try { 92 toploc = new String(top.location); 93} catch (err) { 94} 95var calendar_parameters = new Object(), original_params = new Object(), schedule_parameters = new Object(); 96// Character counter 97 98$(function(){ 99 100 var counter_chars = 0; 101 102 $('.counter').each(function() { 103 if($(this).hasClass('blog')) { 104 counter_chars = 5000 105 } 106 if($(this).hasClass('guestbook')) { 107 counter_chars = 2000; 108 } 109 if($(this).hasClass('contact')) { 110 counter_chars = 400; 111 } 112 chars_left($(this).attr('id'), counter_chars, $(this).attr('id').replace(/\D/g,'')); 113 }); 114 115 //console.log(calendar_parameters); 116 $.each(calendar_parameters, function(calendar_id, params) { 117 $('#calendar-'+calendar_id).displayCalendar('add', params); 118 $('.calendar-container').delegate('.more-like', 'click', function() { 119 var tab_options = params; 120 tab_options.calendar_id = $(this).attr('rel'); 121 tab_options.part_id = $('#calendar-'+tab_options.calendar_id).parent().attr('id').replace('tabs-', ''); 122 tab_options.filter_search = $(this).attr('id').replace('more-', ''); 123 $.fn.displayCalendar('display', tab_options); 124 return false; 125 }); 126 $('.calendar-container').delegate('.show-all', 'click', function() { 127 var tab_options = params; 128 tab_options.calendar_id = $(this).attr('rel'); 129 tab_options.part_id = $('#calendar-'+tab_options.calendar_id).parent().attr('id').replace('tabs-', ''); 130 delete tab_options.filter_search; 131 $.fn.displayCalendar('display', tab_options); 132 return false; 133 }); 134 }); 135 136 137 // Init schedules 138 $.each(schedule_parameters, function(schedule_id, params) { 139 $('#schedule-'+schedule_id).displaySchedule('add', params); 140 141 // Filter 142 $('.schedule-container').undelegate('.filter-items', 'click'); 143 $('.schedule-container').delegate('.filter-items', 'click', function(e) { 144 var tab_options = params; 145 tab_options.schedule_id = $('.ui-tabs-selected').attr('rel'); 146 tab_options.item_id = $(this).attr('id').replace('more-', ''); 147 tab_options.filter_search = $(this).attr('rel'); 148 $('#schedule-'+tab_options.schedule_id).displaySchedule('display', tab_options); 149 e.preventDefault(); 150 }); 151 $('.schedule-container').undelegate('.show-all-items', 'click'); 152 $('.schedule-container').delegate('.show-all-items', 'click', function(e) { 153 var tab_options = params; 154 tab_options.schedule_id = $('.ui-tabs-selected').attr('rel'); 155 tab_options.item_id = $(this).attr('id').replace('more-', ''); 156 tab_options.filter_search = ''; 157 $('#schedule-'+tab_options.schedule_id).displaySchedule('display', tab_options); 158 e.preventDefault(); 159 }); 160 161 /* 162 $('.schedule-container').delegate('.filter-items', 'click', function() { 163 var tab_options =params; 164 tab_options.item_id = $(this).attr('id').replace('more-', ''); 165 tab_options.filter_search = $(this).attr('rel') 166 $.fn.displaySchedule('display', tab_options); 167 return false; 168 }); 169 170 $('.schedule-container').delegate('.show-all-items', 'click', function() { 171 var tab_options = params; 172 tab_options.schedule_id = $('.ui-tabs-selected').attr('rel'); 173 delete tab_options.filter_search; 174 $.fn.displaySchedule('display', tab_options); 175 return false; 176 }); */ 177 }); 178 $.each(original_params, function(part_id, params) { 179 if (params.no_schedules) { 180 $('.schedule-'+part_id).after('<div id="no-schedules"><strong>There are no schedules to display.</strong>'); 181 } 182 }); 183}); 184 185var over = false; 186function chars_left(source_id, count, target) { 187 if($('#'+source_id).length > 0) { 188 //Current character count 189 var current = $('#'+source_id).val().length; 190 //How many left? 191 var chars_left = count - current; 192 //Over the limit or not? 193 if(chars_left < 0) { 194 var currentval = $('#'+source_id).val(); 195 $('#'+source_id).val(currentval.substr(0, (count))); 196 var current = $('#'+source_id).val().length; 197 var chars_left = count - current; 198 } 199 $('#'+target).css('font-weight', chars_left > 0 ? 'normal' : 'bold'); 200 $('#'+target).text(chars_left); 201 } 202} 203 204function check() { 205 if(over == true) { 206 document.getElementById('formInputButton').disabled = true; 207 document.getElementById('warning').innerHTML = "Your message is to long, please shorten it."; 208 } 209 } 210 211// jQuery 212if(typeof jQuery == 'undefined') {
213 document.write('<script type="text/javascript" src="js/jquery-1.3.2.min.js"><\/script>'); 214} 215 216// Media embed 217function writeFlash(p) { 218 writeEmbed( 219 'D27CDB6E-AE6D-11cf-96B8-444553540000', 220 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0', 221 'application/x-shockwave-flash', 222 p 223 ); 224} 225 226function writeShockWave(p) { 227 writeEmbed( 228 '166B1BCA-3F9C-11CF-8075-444553540000', 229 'http://download.macromedia.com/pub/shockwave/cabs/director/sw.cab#version=8,5,1,0', 230 'application/x-director', 231 p 232 ); 233} 234 235function writeQuickTime(p) { 236 writeEmbed( 237 '02BF25D5-8C17-4B23-BC80-D3488ABDDC6B', 238 'http://www.apple.com/qtactivex/qtplugin.cab#version=6,0,2,0', 239 'video/quicktime', 240 p 241 ); 242} 243 244function writeRealMedia(p) { 245 writeEmbed( 246 'CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA', 247 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0', 248 'audio/x-pn-realaudio-plugin', 249 p 250 ); 251} 252 253function writeWindowsMedia(p) { 254 p.url = p.src; 255 writeEmbed( 256 '6BF52A52-394A-11D3-B153-00C04F79FAA6', 257 'http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701', 258 'application/x-mplayer2', 259 p 260 ); 261} 262 263function writeEmbed(cls, cb, mt, p) { 264 var h = '', n; 265 266 h += '<object classid="clsid:' + cls + '" codebase="' + cb + '"'; 267 h += typeof(p.id) != "undefined" ? 'id="' + p.id + '"' : ''; 268 h += typeof(p.name) != "undefined" ? 'name="' + p.name + '"' : ''; 269 h += typeof(p.width) != "undefined" ? 'width="' + p.width + '"' : ''; 270 h += typeof(p.height) != "undefined" ? 'height="' + p.height + '"' : ''; 271 h += typeof(p.align) != "undefined" ? 'align="' + p.align + '"' : ''; 272 h += '>'; 273 274 for (n in p) 275 h += '<param name="' + n + '" value="' + p[n] + '">'; 276 277 h += '<embed type="' + mt + '"'; 278 279 for (n in p) 280 h += n + '="' + p[n] + '" '; 281 282 h += '></embed></object>'; 283 284 document.write(h); 285} 286 287// MAYGO 288// jQuery tooltip 289(function($){var helper={},current,title,tID,IE=$.browser.msie&&/MSIE\s(5\.5|6\.)/.test(navigator.userAgent),track=false;$.tooltip={blocked:false,defaults:{delay:200,fade:false,showURL:true,extraClass:"",top:15,left:15,id:"tooltip"},block:function(){$.tooltip.blocked=!$.tooltip.blocked;}};$.fn.extend({tooltip:function(settings){settings=$.extend({},$.tooltip.defaults,settings);createHelper(settings);return this.each(function(){$.data(this,"tooltip",settings);this.tOpacity=helper.parent.css("opacity");this.tooltipText=this.title;$(this).removeAttr("title");this.alt="";}).mouseover(save).mouseout(hide).click(hide);},fixPNG:IE?function(){return this.each(function(){var image=$(this).css('backgroundImage');if(image.match(/^url\(["']?(.*\.png)["']?\)$/i)){image=RegExp.$1;$(this).css({'backgroundImage':'none','filter':"progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, sizingMethod=crop, src='"+image+"')"}).each(function(){var position=$(this).css('position');if(position!='absolute'&&position!='relative')$(this).css('position','relative');});}});}:function(){return this;},unfixPNG:IE?function(){return this.each(function(){$(this).css({'filter':'',backgroundImage:''});});}:function(){return this;},hideWhenEmpty:function(){return this.each(function(){$(this)[$(this).html()?"show":"hide"]();});},url:function(){return this.attr('href')||this.attr('src');}});function createHelper(settings){if(helper.parent)return;helper.parent=$('<div id="'+settings.id+'"><h3></h3><div class="body"></div><div class="url"></div></div>').appendTo(document.body).hide();if($.fn.bgiframe)helper.parent.bgiframe();helper.title=$('h3',helper.parent);helper.body=$('div.body',helper.parent);helper.url=$('div.url',helper.parent);}function settings(element){return $.data(element,"tooltip");}function handle(event){if(settings(this).delay)tID=setTimeout(show,settings(this).delay);else 290show();track=!!settings(this).track;$(document.body).bind('mousemove',update);update(event);}function save(){if($.tooltip.blocked||this==current||(!this.tooltipText&&!settings(this).bodyHandler))return;current=this;title=this.tooltipText;if(settings(this).bodyHandler){helper.title.hide();var bodyContent=settings(this).bodyHandler.call(this);if(bodyContent.nodeType||bodyContent.jquery){helper.body.empty().append(bodyContent)}else{helper.body.html(bodyContent);}helper.body.show();}else if(settings(this).showBody){var parts=title.split(settings(this).showBody);helper.title.html(parts.shift()).show();helper.body.empty();for(var i=0,part;(part=parts[i]);i++){if(i>0)helper.body.append("<br/>");helper.body.append(part);}helper.body.hideWhenEmpty();}else{helper.title.html(title).show();helper.body.hide();}
290if(settings(this).showURL&&$(this).url())helper.url.html($(this).url().replace('http://','')).show();else 291helper.url.hide();helper.parent.addClass(settings(this).extraClass);if(settings(this).fixPNG)helper.parent.fixPNG();handle.apply(this,arguments);}function show(){tID=null;if((!IE||!$.fn.bgiframe)&&settings(current).fade){if(helper.parent.is(":animated"))helper.parent.stop().show().fadeTo(settings(current).fade,current.tOpacity);else 292helper.parent.is(':visible')?helper.parent.fadeTo(settings(current).fade,current.tOpacity):helper.parent.fadeIn(settings(current).fade);}else{helper.parent.show();}update();}function update(event){if($.tooltip.blocked)return;if(event&&event.target.tagName=="OPTION"){return;}if(!track&&helper.parent.is(":visible")){$(document.body).unbind('mousemove',update)}if(current==null){$(document.body).unbind('mousemove',update);return;}helper.parent.removeClass("viewport-right").removeClass("viewport-bottom");var left=helper.parent[0].offsetLeft;var top=helper.parent[0].offsetTop;if(event){left=event.pageX+settings(current).left;top=event.pageY+settings(current).top;var right='auto';if(settings(current).positionLeft){right=$(window).width()-left;left='auto';}helper.parent.css({left:left,right:right,top:top});}var v=viewport(),h=helper.parent[0];if(v.x+v.cx<h.offsetLeft+h.offsetWidth){left-=h.offsetWidth+20+settings(current).left;helper.parent.css({left:left+'px'}).addClass("viewport-right");}if(v.y+v.cy<h.offsetTop+h.offsetHeight){top-=h.offsetHeight+20+settings(current).top;helper.parent.css({top:top+'px'}).addClass("viewport-bottom");}}function viewport(){return{x:$(window).scrollLeft(),y:$(window).scrollTop(),cx:$(window).width(),cy:$(window).height()};}function hide(event){if($.tooltip.blocked)return;if(tID)clearTimeout(tID);current=null;var tsettings=settings(this);function complete(){helper.parent.removeClass(tsettings.extraClass).hide().css("opacity","");}if((!IE||!$.fn.bgiframe)&&tsettings.fade){if(helper.parent.is(':animated'))helper.parent.stop().fadeTo(tsettings.fade,0,complete);else 293helper.parent.stop().fadeOut(tsettings.fade,complete);}else 294complete();if(settings(this).fixPNG)helper.parent.unfixPNG();}})(jQuery); 295 296// Menu and tooltip initialisation 297$(function() { 298 if(jQuery.inArray('gallery', page_types) != -1) { 299 $('.show_caption').tooltip({ 300 track: true, 301 delay: 0, 302 top: 0, 303 showURL: false, 304 bodyHandler: function() { 305 var tooltip_text = $(this).find('.hidden_caption').text(); 306 if(tooltip_text != '' ) { 307 return tooltip_text; 308 } else { 309 return false; 310 } 311 } 312 }); 313 if(!jQuery.support.cssFloat) { 314 $('.thumbnail_nofooter').css('height','24px'); 315 } 316 } 317 318 // Log stats 319 if( ! design_mode) { 320 $.post('/log-statistics.php', { 321 data: stats_data 322 }, function(response) { 323 if (response) { 324 response = $.parseJSON(response) 325 if(response.enabled == 'yes') { 326 var img_dir = '//media.freeola.com/images/addons/hitcounter/images/'+response.style+'/'; 327 var html = '<table style="clear:both;" width="116" border="0" cellspacing="0" cellpadding="0" align="center"><tr><td colspan="8" align="center" style="padding-top: 6px;"><span style="font: 11px arial;">Visitor Counter:</span></td></tr><tr>'; 328 html += '<td valign="bottom" class="'+response.style+'hcleftcol" width="4" style="background:url(//media.freeola.com/images/addons/hitcounter/images/'+response.style+'/left.gif) no-repeat;"></td>'; 329 for(var i = 0; i <= response.num_digits; i++) { 330 if(response.digits[i] != '') { 331 html += '<td width="18"><img src="'+img_dir+response.digits[i]+'.gif" alt="'+response.digits[i]+'" /></td>'; 332 } 333 } 334 html += '<td valign="bottom" class="'+response.style+'hcrightcol" width="4" style="background:url(//media.freeola.com/images/addons/hitcounter/images/'+response.style+'/right.gif) no-repeat;"></td></tr><tr><td colspan="8" style="padding-bottom: 6px;"> </td></tr></table>'; 335 $('#hit-counter-box').html(html); 336 } 337 } 338 } 339 ); 340 } 341 342 // Fix for IE 343 if(!jQuery.support.cssFloat) { 344 $('#banner_small').width(690); 345 } 346}); 347 348 349//MAY GO 350// 351 352window.matrix = new function(){ 353 var self = this 354 355 var elements = {} 356 var has_nav = false 357 var rendered = false 358 var expanded = false 359 var last_width = 0 360 var global_events = false 361 362 self.update_elements = function(){ 363 elements = { 364 $nav_wrap: $('#top_nav_wrap') 365 } 366 has_nav = elements.$nav_wrap.length > 0 367 368 if(has_nav){ 369 370 elements.$nav_outer = $('#top_navigation1') 371 elements.$nav_ul = elements.$nav_outer.children('ul') 372 373 elements.items = [] 374 elements.$nav_ul.children(':not(.waffle)').each(function(){ 375 var $this = $(this) 376 elements.items.push({ 377 $item:$this, 378 classname:$(this).children('a').attr('class'), 379 matrixed:false 380 }) 381 }) 382 383 elements.$waffle = elements.$nav_ul.children('.waffle') 384 .click(function(){ 385 self.toggle_menu() 386 return false 387 }) 388 elements.$waffle_a = elements.$waffle.children('a') 389 elements.$waffle_icon = elements.$waffle.find('.waffle-icon') 390 391 var group_colour = elements.$nav_wrap.attr('data-nav-colour') || '#FFFFFF' 392 393 elements.$expand_outer = elements.$nav_wrap.find('.expand-menu-outer') 394 if(elements.$expand_outer.length > 0){ 395 elements.$expand_inner = elements.$expand_outer.children('.expand-menu') 396 elements.$expand_ul = elements.$expand_inner.children('ul') 397 } else {
398 elements.$expand_outer = $('<div />') 399 .addClass('expand-menu-outer') 400 .insertAfter(elements.$nav_wrap) 401 .hide() 402 .on('touchstart', function(e) { 403 e.stopPropagation() 404 }) 405 elements.$expand_inner = $('<div />') 406 .addClass('expand-menu') 407 .appendTo(elements.$expand_outer) 408 elements.$expand_ul = $('<ul />').appendTo(elements.$expand_inner) 409 } 410 411 elements.$expand_inner.css({ 412 borderColor:group_colour 413 }) 414 415 } 416 417 rendered = false 418 expanded = false 419 last_width = 0 420 } 421 422 self.refresh = function(){ 423 if(!has_nav) 424 return 425 426 var current_width = elements.$nav_outer.width() 427 if(current_width == last_width) 428 return 429 430 last_width = current_width 431 432 if(rendered){ 433 for(var i in elements.items){ 434 var item = elements.items[i] 435 if(item.matrixed){ 436 item.$item 437 .appendTo(elements.$nav_ul) 438 .children('a').attr('class', item.classname) 439 item.matrixed = false 440 } 441 } 442 elements.$waffle.prependTo(elements.$nav_ul) 443 elements.$waffle_icon.removeClass('fa-bars') 444 elements.$expand_inner.removeClass('waffle-menu burger-menu quarters thirds') 445 elements.$nav_outer.removeClass('matrix-menu-loaded') 446 elements.$expand_outer.hide() 447 } 448 elements.$waffle_icon.addClass('fa fa-th').removeClass('fa-bars') 449 450 var max_top = elements.$nav_ul.children('li').first().position().top 451 var max_left = current_width 452 453 // Hide the button and see if the last item fits 454 // If it doesn't show the button and create a dropdown 455 elements.$waffle.hide() 456 var $last_item = elements.$nav_ul.children('li').last() 457 var position = $last_item.position() 458 if(position.left + $last_item.outerWidth(true) >= max_left || position.top > max_top) 459 elements.$waffle.show() 460 else 461 return 462 463 // Make sure the font size is at least 14px as font awesome looks bad smaller 464 var current_waffle_size = parseInt(elements.$waffle_icon.css('font-size').match(/\d+/g)[0]) 465 var min_size = 14 466 var odd_sizes = { 467 15:14, 468 16:14, 469 17:18, 470 19:18, 471 20:21, 472 23:24, 473 29:30 474 } 475 if(current_waffle_size > 0){ 476 if(current_waffle_size < min_size){ 477 var difference = Math.floor((min_size - current_waffle_size)/2) 478 elements.$waffle_icon.css({ 479 'fontSize': min_size + 'px', 480 'position': 'relative', 481 'top': difference + 'px' 482 }) 483 current_waffle_size = min_size 484 } 485 for(var size in odd_sizes){ 486 if(current_waffle_size == size){ 487 elements.$waffle_icon.css('fontSize',odd_sizes[size]) 488 current_waffle_size = odd_sizes[size] 489 } 490 } 491 } 492 elements.$waffle_icon.css('min-width', (current_waffle_size + 2) + 'px') 493 494 // 3. Move items that don't fit in the main menu into the dropdown 495 var moved_item_count = 0 496 var text_styling = { 497 'font-family':'', 498 'text-transform':'', 499 'font-size':'', 500 'font-weight':'' 501 } 502 for(var attr in text_styling){ 503 text_styling[attr] = elements.$waffle_a.css(attr) 504 } 505 506 var type = 'waffle' 507 508 var too_thin = elements.$nav_wrap.width() < 400 509 510 for(var i = elements.items.length -1;i>=0;i--){ 511 var item = elements.items[i] 512 var $li = item.$item 513 var position = $li.position() 514 if(too_thin 515 || position.left + $li.outerWidth(true) + ($li.next().length > 0 && $('div.expand-menu-outer').length > 0 ? $('li.waffle').outerWidth(true) : 0) >= max_left 516 || position.top > max_top) { 517 $li.prependTo(elements.$expand_ul) 518 item.matrixed = true 519 $li.children('a').css(text_styling) 520 moved_item_count += 1 521 } 522 } 523 524 elements.$expand_ul.find('li:not(.waffle) a.top_navigation').removeClass('top_navigation') 525 elements.$expand_ul.find('.navigation_selected').removeClass('navigation_selected').addClass('selected') 526 527 // 4. Decide if we want a waffle or burger 528 if(moved_item_count == 0){ 529 elements.$waffle.hide() 530 return 531 } 532 if(moved_item_count <= 5 || elements.$nav_wrap.width() < 600) 533 type = 'burger' 534 elements.$expand_inner.addClass(type + '-menu').height('auto').show() 535 elements.$expand_outer.show() 536 537 // 5. If the new menu is a waffle, decide the number of columns 538 if(type == 'waffle'){ 539 var has_overflowing_columns = function(){ 540 var overflowing = false 541 elements.$expand_ul.children('li').each(function(){ 542 if(!overflowing){ 543 var $li = $(this) 544 var $a = $li.children('a') 545 // 20 hardcoded padding 546 if($a.width() > $li.width() - 20) 547 overflowing = true 548 } 549 }) 550 return overflowing 551 } 552 553 elements.$expand_inner.addClass('quarters check-widths') 554 if(has_overflowing_columns()) 555 elements.$expand_inner.removeClass('quarters') 556 .addClass('thirds') 557 if(has_overflowing_columns()) 558 elements.$expand_inner.removeClass('thirds') 559 // If still cant fit, fall back to burger 560 if(has_overflowing_columns()){ 561 type='burger' 562 elements.$expand_inner.removeClass('waffle-menu') 563 .addClass('burger-menu') 564 } 565 elements.$expand_inner.removeClass('check-widths') 566 } 567 // If need bars instead of waffle, switch icon over 568 if(type != 'waffle') 569 elements.$waffle_icon.removeClass('fa-th').addClass('fa-bars') 570 571 elements.$expand_inner.hide() 572 573 // 6. Add the matrix menu loaded class for post-load css and move the more button to the end 574 elements.$nav_outer.addClass('matrix-menu-loaded') 575 576 rendered = true 577 } 578 579 self.show_menu = function(){ 580 self.toggle_menu(true) 581 } 582 583 self.hide_menu = function(){ 584 self.toggle_menu(false) 585 } 586 587 self.toggle_menu = function(show){ 588 if(show === undefined){ 589 show = !expanded 590 } 591 if(show && !expanded){ 592 elements.$expand_inner && elements.$expand_inner.slideDown(200) 593 expanded = true 594 } else if(!show && expanded){ 595 elements.$expand_inner && elements.$expand_inner.stop().slideUp(200) 596 expanded = false 597 } 598 } 599 600 self.add_global_events = function(){ 601 602 if(global_events){ 603 return 604 } 605 global_events = true 606 607 $(document).click(function(e){
608 if(expanded && e.button == 0){ 609 var $target = $(e.target) 610 if($target.is('a') || $(e.target).closest('.expand-menu').length == 0){ 611 self.hide_menu() 612 } 613 } 614 }) 615 616 var timeout_ref 617 $(window).on('resize', function() { 618 clearTimeout(timeout_ref) 619 timeout_ref = setTimeout(function() { 620 self.refresh() 621 }, 100) 622 }) 623 624 } 625 626 self.init = function(){ 627 self.add_global_events() 628 self.update_elements() 629 self.refresh() 630 } 631 632 return self 633}() 634 635$(function(){ 636 matrix.init() 637}) 638$(window).on('load', function(){ 639 matrix.refresh() 640}) 641 642// Thickbox 643 644$.browser.msie6 = $.browser.msie && /MSIE 6\.0/i.test(window.navigator.userAgent) && !/MSIE 7\.0/i.test(window.navigator.userAgent); 645 646function getRandomNumber(range) { 647 return Math.floor(Math.random() * range); 648} 649 650function getRandomChar() { 651 var chars = "0123456789abcdefghijklmnopqurstuvwxyzABCDEFGHIJKLMNOPQURSTUVWXYZ"; 652 return chars.substr( getRandomNumber(62), 1 ); 653} 654 655function randomID(size) { 656 var str = ""; 657 for(var i = 0; i < size; i++) 658 { 659 str += getRandomChar(); 660 } 661 return str; 662} 663 664$.browser.msie6 = $.browser.msie && /MSIE 6\.0/i.test(window.navigator.userAgent) && !/MSIE 7\.0/i.test(window.navigator.userAgent); 665 666function getRandomNumber(range) { 667 return Math.floor(Math.random() * range); 668} 669 670function getRandomChar() { 671 var chars = "0123456789abcdefghijklmnopqurstuvwxyzABCDEFGHIJKLMNOPQURSTUVWXYZ"; 672 return chars.substr( getRandomNumber(62), 1 ); 673} 674 675function randomID(size) { 676 var str = ""; 677 for(var i = 0; i < size; i++) 678 { 679 str += getRandomChar(); 680 } 681 return str; 682} 683 684var tb_pathToImage = "//media.freeola.com/images/images/loadingAnimation.gif"; 685/*!!!!!!!!!!!!!!!!! edit below this line at your own risk !!!!!!!!!!!!!!!!!!!!!!!*/ 686//on page load call tb_init 687 688$(document).ready(function(){ 689 tb_init('a.thickbox, area.thickbox, input.thickbox');//pass where to apply thickbox 690 imgLoader = new Image();// preload image 691 imgLoader.src = tb_pathToImage; 692}); 693//add thickbox to href & area elements that have a class of .thickbox 694function tb_init(domChunk){ 695 $(domChunk).click(function(){ 696 //var t = this.title || this.name || null; 697 var t = this.rev || this.name || false; 698 var a = this.href || this.alt; 699 var g = this.rel || false; 700 tb_show(t,a,g); 701 this.blur(); 702 return false; 703 }); 704} 705function tb_show(caption, url, imageGroup) {//function called when the user clicks on a thickbox link 706 try { 707 if (typeof document.body.style.maxHeight === "undefined") {//if IE 6 708 $("body","html").css({height: "100%", width: "100%"}); 709 $("html").css("overflow","hidden"); 710 if (document.getElementById("TB_HideSelect") === null) {//iframe to hide select elements in ie6 711 $("body").append("<iframe src='javascript:false;' id='TB_HideSelect'></iframe><div id='TB_overlay'></div><div id='TB_window'></div>"); 712 $("#TB_overlay").click(tb_remove); 713 } 714 }else{//all others 715 if(document.getElementById("TB_overlay") === null){ 716 $("body").append("<div id='TB_overlay'></div><div id='TB_window'></div>"); 717 $("#TB_overlay").click(tb_remove); 718 } 719 } 720 721 if(tb_detectMacXFF()){ 722 $("#TB_overlay").addClass("TB_overlayMacFFBGHack");//use png overlay so hide flash 723 }else{ 724 $("#TB_overlay").addClass("TB_overlayBG");//use background and opacity 725 } 726 727 if(caption===null){caption="";} 728 $("body").append("<div id='TB_load'><img src='"+imgLoader.src+"' /></div>");//add loader to the page 729 $('#TB_load').show();//show loader 730 731 var baseURL; 732 if(url.indexOf("?")!==-1){ //ff there is a query string involved 733 baseURL = url.substr(0, url.indexOf("?")); 734 }else{ 735 baseURL = url; 736 } 737 738 var urlString = /\.jpg$|\.jpeg$|\.png$|\.gif$|\.bmp$/; 739 var urlType = baseURL.toLowerCase().match(urlString); 740 if(urlType == '.jpg' || urlType == '.jpeg' || urlType == '.png' || urlType == '.gif' || urlType == '.bmp'){//code to show images 741 742 TB_PrevCaption = ""; 743 TB_PrevURL = ""; 744 TB_PrevHTML = ""; 745 TB_NextCaption = ""; 746 TB_NextURL = ""; 747 TB_NextHTML = ""; 748 TB_imageCount = ""; 749 TB_FoundURL = false; 750 if(imageGroup){ 751 TB_TempArray = $("a[rel="+imageGroup+"]").get(); 752 for (TB_Counter = 0; ((TB_Counter < TB_TempArray.length) && (TB_NextHTML === "")); TB_Counter++) { 753 var urlTypeTemp = TB_TempArray[TB_Counter].href.toLowerCase().match(urlString); 754 if (!(TB_TempArray[TB_Counter].href == url)) { 755 if (TB_FoundURL) { 756 //TB_NextCaption = TB_TempArray[TB_Counter].title; 757 TB_NextCaption = TB_TempArray[TB_Counter].rev; 758 TB_NextURL = TB_TempArray[TB_Counter].href; 759 TB_NextHTML = "<span id='TB_next'> <a href='#'>Next ></a></span>"; 760 } else { 761 //TB_PrevCaption = TB_TempArray[TB_Counter].name; 762 TB_PrevCaption = TB_TempArray[TB_Counter].rev; 763 TB_PrevURL = TB_TempArray[TB_Counter].href; 764 TB_PrevHTML = "<span id='TB_prev'> <a href='#'>< Prev</a></span>"; 765 } 766 } else { 767 TB_FoundURL = true; 768 TB_imageCount = "Image " + (TB_Counter + 1) +" of "+ (TB_TempArray.length); 769 } 770 } 771 } 772 imgPreloader = new Image(); 773 imgPreloader.onload = function(){ 774 imgPreloader.onload = null; 775 776 // Resizing large images - orginal by Christian Montoya edited by me. 777 var pagesize = tb_getPageSize(); 778 var x = pagesize[0] - 170; 779 var y = pagesize[1] - 170; 780 var imageWidth = imgPreloader.width; 781 var imageHeight = imgPreloader.height; 782 if (imageWidth > x) { 783 imageHeight = imageHeight * (x / imageWidth);
784 imageWidth = x; 785 if (imageHeight > y) { 786 imageWidth = imageWidth * (y / imageHeight); 787 imageHeight = y; 788 } 789 } else if (imageHeight > y) { 790 imageWidth = imageWidth * (y / imageHeight); 791 imageHeight = y - 30; 792 if (imageWidth > x) { 793 imageHeight = imageHeight * (x / imageWidth); 794 imageWidth = x; 795 } 796 } 797 // End Resizing 798 799 TB_WIDTH = imageWidth + 30; 800 if(TB_WIDTH < 200) { 801 TB_WIDTH = TB_WIDTH + (200 - TB_WIDTH); 802 } 803 TB_HEIGHT = imageHeight + 100; 804 805 806 function stripHTML(oldString) { 807 808 return oldString.replace(/<[^>]*>/g, ""); 809 810} 811 812 var description_exists = caption.indexOf("##"); 813 if(description_exists >= 0) { 814 var caption_array = caption.split("##"); 815 var alt = caption_array[1].replace('##', ''); 816 if(alt.replace(/<(?:.|\s)*?>/g, "") != alt) { 817 alt = ''; 818 } 819 $("#TB_window").append("<div id='TB_closeWindow'><a href='#' id='TB_closeWindowButton' title='Close'>close</a> or Esc Key</div><a href='' id='TB_ImageOff' title='Close'><img id='TB_Image' src='"+url+"' width='"+imageWidth+"' height='"+imageHeight+"' alt=\""+alt+"\"/></a>" + "<div id='TB_caption'><div class='caption'>"+caption_array[0].replace('##', '')+"</div><div class='description'>"+caption_array[1].replace('##', '')+"</div><div id='TB_secondLine'>" + TB_imageCount + TB_PrevHTML + TB_NextHTML + "</div></div>"); 820 } else { 821 $("#TB_window").append("<div id='TB_closeWindow'><a href='#' id='TB_closeWindowButton' title='Close'>close</a> or Esc Key</div><a href='' id='TB_ImageOff' title='Close'><img id='TB_Image' src='"+url+"' width='"+imageWidth+"' height='"+imageHeight+"' alt=\""+caption.replace('##', '')+"\"/></a>" + "<div id='TB_caption'>"+caption.replace('##', '')+"<div id='TB_secondLine'>" + TB_imageCount + TB_PrevHTML + TB_NextHTML + "</div></div>"); 822 } 823 824 $("#TB_closeWindowButton").click(tb_remove); 825 826 if (!(TB_PrevHTML === "")) { 827 function goPrev(){ 828 if($(document).unbind("click",goPrev)){$(document).unbind("click",goPrev);} 829 $("#TB_window").remove(); 830 $("body").append("<div id='TB_window'></div>"); 831 tb_show(TB_PrevCaption, TB_PrevURL, imageGroup); 832 return false; 833 } 834 $("#TB_prev").click(goPrev); 835 } 836 837 if (!(TB_NextHTML === "")) { 838 function goNext(){ 839 $("#TB_window").remove(); 840 $("body").append("<div id='TB_window'></div>"); 841 tb_show(TB_NextCaption, TB_NextURL, imageGroup); 842 return false; 843 } 844 $("#TB_next").click(goNext); 845 846 } 847 document.onkeydown = function(e){ 848 if (e == null) { // ie 849 keycode = event.keyCode; 850 } else { // mozilla 851 keycode = e.which; 852 } 853 if(keycode == 27){ // close 854 tb_remove(); 855 } else if(keycode == 190){ // display previous image 856 if(!(TB_NextHTML == "")){ 857 document.onkeydown = ""; 858 goNext(); 859 } 860 } else if(keycode == 188){ // display next image 861 if(!(TB_PrevHTML == "")){ 862 document.onkeydown = ""; 863 goPrev(); 864 } 865 } 866 }; 867 868 tb_position(); 869 $("#TB_load").remove(); 870 $("#TB_ImageOff").click(tb_remove); 871 $("#TB_window").css({display:"block"}); //for safari using css instead of show 872 }; 873 874 imgPreloader.src = url; 875 }else{//code to show html 876 877 var queryString = url.replace(/^[^\?]+\??/,''); 878 var params = tb_parseQuery( queryString ); 879 TB_WIDTH = (params['width']*1) + 30 || 630; //defaults to 630 if no paramaters were added to URL 880 TB_HEIGHT = (params['height']*1) + 40 || 440; //defaults to 440 if no paramaters were added to URL 881 ajaxContentW = TB_WIDTH - 30; 882 ajaxContentH = TB_HEIGHT - 45; 883 884 if(url.indexOf('TB_iframe') != -1){// either iframe or ajax window 885 urlNoQuery = url.split('TB_'); 886 $("#TB_iframeContent").remove(); 887 if(params['modal'] != "true"){//iframe no modal 888 $("#TB_window").append("<div id='TB_title'><div id='TB_ajaxWindowTitle'>"+caption+"</div><div id='TB_closeAjaxWindow'><a href='#' id='TB_closeWindowButton' title='Close'>close</a> or Esc Key</div></div><iframe frameborder='0' hspace='0' src='"+urlNoQuery[0]+"' id='TB_iframeContent' name='TB_iframeContent"+Math.round(Math.random()*1000)+"' onload='tb_showIframe()' style='width:"+(ajaxContentW + 29)+"px;height:"+(ajaxContentH + 17)+"px;' > </iframe>"); 889 }else{//iframe modal 890 $("#TB_overlay").unbind(); 891 $("#TB_window").append("<iframe frameborder='0' hspace='0' src='"+urlNoQuery[0]+"' id='TB_iframeContent' name='TB_iframeContent"+Math.round(Math.random()*1000)+"' onload='tb_showIframe()' style='width:"+(ajaxContentW + 29)+"px;height:"+(ajaxContentH + 17)+"px;'> </iframe>"); 892 } 893 }else{// not an iframe, ajax 894 if($("#TB_window").css("display") != "block"){ 895 if(params['modal'] != "true"){//ajax no modal 896 if($.browser.msie) { 897 ajaxContentW = '100%'; 898 } else { 899 ajaxContentW = ajaxContentW + 'px'; 900 } 901 if(params['width'] == 'auto') { 902 ajaxContentW = 'auto'; 903 }
904 if(params['height'] == 'auto') { 905 ajaxContentH = 'auto'; 906 } else { 907 ajaxContentH = ajaxContentH+'px'; 908 } 909 $("#TB_window").append("<div id='TB_title'><div id='TB_ajaxWindowTitle'>"+caption+"</div><div id='TB_closeAjaxWindow'><a href='#' id='TB_closeWindowButton'>close</a> or Esc Key</div></div><div id='TB_ajaxContent' style='width:"+ajaxContentW+";height:"+ajaxContentH+";'></div>"); 910 }else{//ajax modal 911 $("#TB_overlay").unbind(); 912 $("#TB_window").append("<div id='TB_ajaxContent' class='TB_modal' style='width:"+ajaxContentW+"px;height:"+ajaxContentH+"px;'></div>"); 913 } 914 }else{//this means the window is already up, we are just loading new content via ajax 915 if(params['width'] == 'auto') { 916 $("#TB_ajaxContent")[0].style.width = 'auto'; 917 } else { 918 $("#TB_ajaxContent")[0].style.width = ajaxContentW +"px"; 919 } 920 if(params['height'] == 'auto') { 921 $("#TB_ajaxContent")[0].style.height = 'auto'; 922 } else { 923 $("#TB_ajaxContent")[0].style.height = ajaxContentH +"px"; 924 } 925 $("#TB_ajaxContent")[0].scrollTop = 0; 926 $("#TB_ajaxWindowTitle").html(caption); 927 } 928 } 929 930 $("#TB_closeWindowButton").click(tb_remove); 931 932 if(url.indexOf('TB_inline') != -1){ 933 $("#TB_ajaxContent").append($('#' + params['inlineId']).children()); 934 $("#TB_window").unload(function () { 935 $('#' + params['inlineId']).append( $("#TB_ajaxContent").children() ); // move elements back when you're finished 936 }); 937 tb_position(); 938 $("#TB_load").remove(); 939 $("#TB_window").css({display:"block"}); 940 }else if(url.indexOf('TB_iframe') != -1){ 941 tb_position(); 942 if($.browser.safari){//safari needs help because it will not fire iframe onload 943 $("#TB_load").remove(); 944 $("#TB_window").css({display:"block"}); 945 } 946 }else{ 947 $("#TB_ajaxContent").load(url += "&random=" + (new Date().getTime()),function(){//to do a post change this load method 948 tb_position(); 949 $("#TB_load").remove(); 950 tb_init("#TB_ajaxContent a.thickbox"); 951 $("#TB_window").css({display:"block"}); 952 }); 953 } 954 955 } 956 if(!params['modal']){ 957 document.onkeyup = function(e){ 958 if (e == null) { // ie 959 keycode = event.keyCode; 960 } else { // mozilla 961 keycode = e.which; 962 } 963 if(keycode == 27){ // close 964 tb_remove(); 965 } 966 }; 967 } 968 969 } catch(e) { 970 //nothing here 971 } 972} 973//helper functions below 974function tb_showIframe(){ 975 $("#TB_load").remove(); 976 $("#TB_window").css({display:"block"}); 977} 978function tb_remove() { 979 $("#TB_imageOff").unbind("click"); 980 $("#TB_closeWindowButton").unbind("click"); 981 $("#TB_window").fadeOut("fast",function(){$('#TB_window,#TB_overlay,#TB_HideSelect').trigger("unload").unbind().remove();}); 982 $("#TB_load").remove(); 983 if (typeof document.body.style.maxHeight == "undefined") {//if IE 6 984 $("body","html").css({height: "auto", width: "auto"}); 985 $("html").css("overflow",""); 986 } 987 document.onkeydown = ""; 988 document.onkeyup = ""; 989 return false; 990} 991function tb_position() { 992$("#TB_window").css({marginLeft: '-' + parseInt((TB_WIDTH / 2),10) + 'px', width: TB_WIDTH + 'px'}); 993 if ( !(jQuery.browser.msie6)) { // take away IE6 994 $("#TB_window").css({marginTop: '-' + parseInt((TB_HEIGHT / 2),10) + 'px'}); 995 } 996} 997function tb_parseQuery ( query ) { 998 var Params = {}; 999 if ( ! query ) {return Params;}// return empty object 1000 var Pairs = query.split(/[;&]/); 1001 for ( var i = 0; i < Pairs.length; i++ ) { 1002 var KeyVal = Pairs[i].split('='); 1003 if ( ! KeyVal || KeyVal.length != 2 ) {continue;} 1004 var key = unescape( KeyVal[0] ); 1005 var val = unescape( KeyVal[1] ); 1006 val = val.replace(/\+/g, ' '); 1007 Params[key] = val; 1008 } 1009 return Params; 1010} 1011function tb_getPageSize(){ 1012 var de = document.documentElement; 1013 var w = window.innerWidth || self.innerWidth || (de&&de.clientWidth) || document.body.clientWidth;
1014 var h = window.innerHeight || self.innerHeight || (de&&de.clientHeight) || document.body.clientHeight; 1015 arrayPageSize = [w,h]; 1016 return arrayPageSize; 1017} 1018function tb_detectMacXFF() { 1019 var userAgent = navigator.userAgent.toLowerCase(); 1020 if (userAgent.indexOf('mac') != -1 && userAgent.indexOf('firefox')!=-1) { 1021 return true; 1022 } 1023} 1024 1025 1026/*! 1027 Colorbox v1.4.27 - 2013-07-16 1028 jQuery lightbox and modal window plugin 1029 (c) 2013 Jack Moore - http://www.jacklmoore.com/colorbox 1030 license: http://www.opensource.org/licenses/mit-license.php 1031*/ 1032(function(t,e,i){function o(i,o,n){var r=e.createElement(i);return o&&(r.id=te+o),n&&(r.style.cssText=n),t(r)}function n(){return i.innerHeight?i.innerHeight:t(i).height()}function r(t){var e=E.length,i=(j+t)%e;return 0>i?e+i:i}function l(t,e){return Math.round((/%/.test(t)?("x"===e?H.width():n())/100:1)*parseInt(t,10))}function h(t,e){return t.photo||t.photoRegex.test(e)}function s(t,e){return t.retinaUrl&&i.devicePixelRatio>1?e.replace(t.photoRegex,t.retinaSuffix):e}function a(t){"contains"in v[0]&&!v[0].contains(t.target)&&(t.stopPropagation(),v.focus())}function d(){var e,i=t.data(A,Z);null==i?(O=t.extend({},Y),console&&console.log&&console.log("Error: cboxElement missing settings object")):O=t.extend({},i);for(e in O)t.isFunction(O[e])&&"on"!==e.slice(0,2)&&(O[e]=O[e].call(A));O.rel=O.rel||A.rel||t(A).data("rel")||"nofollow",O.href=O.href||t(A).attr("href"),O.title=O.title||A.title,"string"==typeof O.href&&(O.href=t.trim(O.href))}function c(i,o){t(e).trigger(i),se.trigger(i),t.isFunction(o)&&o.call(A)}function u(){var t,e,i,o,n,r=te+"Slideshow_",l="click."+te;O.slideshow&&E[1]?(e=function(){clearTimeout(t)},i=function(){(O.loop||E[j+1])&&(t=setTimeout(J.next,O.slideshowSpeed))},o=function(){R.html(O.slideshowStop).unbind(l).one(l,n),se.bind(ne,i).bind(oe,e).bind(re,n),v.removeClass(r+"off").addClass(r+"on")},n=function(){e(),se.unbind(ne,i).unbind(oe,e).unbind(re,n),R.html(O.slideshowStart).unbind(l).one(l,function(){J.next(),o()}),v.removeClass(r+"on").addClass(r+"off")},O.slideshowAuto?o():n()):v.removeClass(r+"off "+r+"on")}function p(i){G||(A=i,d(),E=t(A),j=0,"nofollow"!==O.rel&&(E=t("."+ee).filter(function(){var e,i=t.data(this,Z);return i&&(e=t(this).data("rel")||i.rel||this.rel),e===O.rel}),j=E.index(A),-1===j&&(E=E.add(A),j=E.length-1)),g.css({opacity:parseFloat(O.opacity),cursor:O.overlayClose?"pointer":"auto",visibility:"visible"}).show(),V&&v.add(g).removeClass(V),O.className&&v.add(g).addClass(O.className),V=O.className,O.closeButton?P.html(O.close).appendTo(x):P.appendTo("<div/>"),$||($=q=!0,v.css({visibility:"hidden",display:"block"}),W=o(ae,"LoadedContent","width:0; height:0; overflow:hidden"),x.css({width:"",height:""}).append(W),_=b.height()+k.height()+x.outerHeight(!0)-x.height(),D=T.width()+C.width()+x.outerWidth(!0)-x.width(),N=W.outerHeight(!0),z=W.outerWidth(!0),O.w=l(O.initialWidth,"x"),O.h=l(O.initialHeight,"y"),J.position(),u(),c(ie,O.onOpen),B.add(S).hide(),v.focus(),O.trapFocus&&e.addEventListener&&(e.addEventListener("focus",a,!0),se.one(le,function(){e.removeEventListener("focus",a,!0)})),O.returnFocus&&se.one(le,function(){t(A).focus()})),w())}function f(){!v&&e.body&&(X=!1,H=t(i),v=o(ae).attr({id:Z,"class":t.support.opacity===!1?te+"IE":"",role:"dialog",tabindex:"-1"}).hide(),g=o(ae,"Overlay").hide(),L=t([o(ae,"LoadingOverlay")[0],o(ae,"LoadingGraphic")[0]]),y=o(ae,"Wrapper"),x=o(ae,"Content").append(S=o(ae,"Title"),M=o(ae,"Current"),K=t('<button type="button"/>').attr({id:te+"Previous"}),I=t('<button type="button"/>').attr({id:te+"Next"}),R=o("button","Slideshow"),L),P=t('<button type="button"/>').attr({id:te+"Close"}),y.append(o(ae).append(o(ae,"TopLeft"),b=o(ae,"TopCenter"),o(ae,"TopRight")),o(ae,!1,"clear:left").append(T=o(ae,"MiddleLeft"),x,C=o(ae,"MiddleRight")),o(ae,!1,"clear:left").append(o(ae,"BottomLeft"),k=o(ae,"BottomCenter"),o(ae,"BottomRight"))).find("div div").css({"float":"left"}),F=o(ae,!1,"position:absolute; width:9999px; visibility:hidden; display:none"),B=I.add(K).add(M).add(R),t(e.body).append(g,v.append(y,F)))}function m(){function i(t){t.which>1||t.shiftKey||t.altKey||t.metaKey||t.ctrlKey||(t.preventDefault(),p(this))}return v?(X||(X=!0,I.click(function(){J.next()}),K.click(function(){J.prev()}),P.click(function(){J.close()}),g.click(function(){O.overlayClose&&J.close()}),t(e).bind("keydown."+te,function(t){var e=t.keyCode;$&&O.escKey&&27===e&&(t.preventDefault(),J.close()),$&&O.arrowKey&&E[1]&&
1032!t.altKey&&(37===e?(t.preventDefault(),K.click()):39===e&&(t.preventDefault(),I.click()))}),t.isFunction(t.fn.on)?t(e).on("click."+te,"."+ee,i):t("."+ee).live("click."+te,i)),!0):!1}function w(){var n,r,a,u=J.prep,p=++de;q=!0,U=!1,A=E[j],d(),c(he),c(oe,O.onLoad),O.h=O.height?l(O.height,"y")-N-_:O.innerHeight&&l(O.innerHeight,"y"),O.w=O.width?l(O.width,"x")-z-D:O.innerWidth&&l(O.innerWidth,"x"),O.mw=O.w,O.mh=O.h,O.maxWidth&&(O.mw=l(O.maxWidth,"x")-z-D,O.mw=O.w&&O.w<O.mw?O.w:O.mw),O.maxHeight&&(O.mh=l(O.maxHeight,"y")-N-_,O.mh=O.h&&O.h<O.mh?O.h:O.mh),n=O.href,Q=setTimeout(function(){L.show()},100),O.inline?(a=o(ae).hide().insertBefore(t(n)[0]),se.one(he,function(){a.replaceWith(W.children())}),u(t(n))):O.iframe?u(" "):O.html?u(O.html):h(O,n)?(n=s(O,n),U=e.createElement("img"),t(U).addClass(te+"Photo").bind("error",function(){O.title=!1,u(o(ae,"Error").html(O.imgError))}).one("load",function(){var e;p===de&&(U.alt=t(A).attr("alt")||t(A).attr("data-alt")||"",O.retinaImage&&i.devicePixelRatio>1&&(U.height=U.height/i.devicePixelRatio,U.width=U.width/i.devicePixelRatio),O.scalePhotos&&(r=function(){U.height-=U.height*e,U.width-=U.width*e},O.mw&&U.width>O.mw&&(e=(U.width-O.mw)/U.width,r()),O.mh&&U.height>O.mh&&(e=(U.height-O.mh)/U.height,r())),O.h&&(U.style.marginTop=Math.max(O.mh-U.height,0)/2+"px"),E[1]&&(O.loop||E[j+1])&&(U.style.cursor="pointer",U.onclick=function(){J.next()}),U.style.width=U.width+"px",U.style.height=U.height+"px",setTimeout(function(){u(U)},1))}),setTimeout(function(){U.src=n},1)):n&&F.load(n,O.data,function(e,i){p===de&&u("error"===i?o(ae,"Error").html(O.xhrError):t(this).contents())})}var g,v,y,x,b,T,C,k,E,H,W,F,L,S,M,R,I,K,P,B,O,_,D,N,z,A,j,U,$,q,G,Q,J,V,X,Y={transition:"elastic",speed:300,fadeOut:300,width:!1,initialWidth:"600",innerWidth:!1,maxWidth:!1,height:!1,initialHeight:"450",innerHeight:!1,maxHeight:!1,scalePhotos:!0,scrolling:!0,inline:!1,html:!1,iframe:!1,fastIframe:!0,photo:!1,href:!1,title:!1,rel:!1,opacity:.9,preloading:!0,className:!1,retinaImage:!1,retinaUrl:!1,retinaSuffix:"@2x.$1",current:"image {current} of {total}",previous:"previous",next:"next",close:"close",xhrError:"This content failed to load.",imgError:"This image failed to load.",open:!1,returnFocus:!0,trapFocus:!0,reposition:!0,loop:!0,slideshow:!1,slideshowAuto:!0,slideshowSpeed:2500,slideshowStart:"start slideshow",slideshowStop:"stop slideshow",photoRegex:/\.(gif|png|jp(e|g|eg)|bmp|ico|webp)((#|\?).*)?$/i,onOpen:!1,onLoad:!1,onComplete:!1,onCleanup:!1,onClosed:!1,overlayClose:!0,escKey:!0,arrowKey:!0,top:!1,bottom:!1,left:!1,right:!1,fixed:!1,data:void 0,closeButton:!0},Z="colorbox",te="cbox",ee=te+"Element",ie=te+"_open",oe=te+"_load",ne=te+"_complete",re=te+"_cleanup",le=te+"_closed",he=te+"_purge",se=t("<a/>"),ae="div",de=0,ce={};t.colorbox||(t(f),J=t.fn[Z]=t[Z]=function(e,i){var o=this;if(e=e||{},f(),m()){if(t.isFunction(o))o=t("<a/>"),e.open=!0;else if(!o[0])return o;i&&(e.onComplete=i),o.each(function(){t.data(this,Z,t.extend({},t.data(this,Z)||Y,e))}).addClass(ee),(t.isFunction(e.open)&&e.open.call(o)||e.open)&&p(o[0])}return o},J.position=function(e,i){function o(){b[0].style.width=k[0].style.width=x[0].style.width=parseInt(v[0].style.width,10)-D+"px",x[0].style.height=T[0].style.height=C[0].style.height=parseInt(v[0].style.height,10)-_+"px"}var r,h,s,a=0,d=0,c=v.offset();if(H.unbind("resize."+te),v.css({top:-9e4,left:-9e4}),h=H.scrollTop(),s=H.scrollLeft(),O.fixed?(c.top-=h,c.left-=s,v.css({position:"fixed"})):(a=h,d=s,v.css({position:"absolute"})),d+=O.right!==!1?Math.max(H.width()-O.w-z-D-l(O.right,"x"),0):O.left!==!1?l(O.left,"x"):Math.round(Math.max(H.width()-O.w-z-D,0)/2),a+=O.bottom!==!1?Math.max(n()-O.h-N-_-l(O.bottom,"y"),0):O.top!==!1?l(O.top,"y"):Math.round(Math.max(n()-O.h-N-_,0)/2),v.css({top:c.top,left:c.left,visibility:"visible"}),y[0].style.width=y[0].style.height="9999px",r={width:O.w+z+D,height:O.h+N+_,top:a,left:d},e){var u=0;t.each(r,function(t){return r[t]!==ce[t]?(u=e,void 0):void 0}),e=u}ce=r,e||v.css(r),v.dequeue().animate(r,{duration:e||0,complete:function(){o(),q=!1,y[0].style.width=O.w+z+D+"px",y[0].style.height=O.h+N+_+"px",O.reposition&&setTimeout(function(){H.bind("resize."+te,J.position)},1),i&&i()},step:o})},J.resize=function(t){var e;$&&(t=t||{},t.width&&(O.w=l(t.width,"x")-z-D),t.innerWidth&&(O.w=l(t.innerWidth,"x")),W.css({width:O.w}
1032),t.height&&(O.h=l(t.height,"y")-N-_),t.innerHeight&&(O.h=l(t.innerHeight,"y")),t.innerHeight||t.height||(e=W.scrollTop(),W.css({height:"auto"}),O.h=W.height()),W.css({height:O.h}),e&&W.scrollTop(e),J.position("none"===O.transition?0:O.speed))},J.prep=function(i){function n(){return O.w=O.w||W.width(),O.w=O.mw&&O.mw<O.w?O.mw:O.w,O.w}function l(){return O.h=O.h||W.height(),O.h=O.mh&&O.mh<O.h?O.mh:O.h,O.h}if($){var a,d="none"===O.transition?0:O.speed;W.empty().remove(),W=o(ae,"LoadedContent").append(i),W.hide().appendTo(F.show()).css({width:n(),overflow:O.scrolling?"auto":"hidden"}).css({height:l()}).prependTo(x),F.hide(),t(U).css({"float":"none"}),a=function(){function i(){t.support.opacity===!1&&v[0].style.removeAttribute("filter")}var n,l,a=E.length,u="frameBorder",p="allowTransparency";$&&(l=function(){clearTimeout(Q),L.hide(),c(ne,O.onComplete)},S.html(O.title).add(W).show(),a>1?("string"==typeof O.current&&M.html(O.current.replace("{current}",j+1).replace("{total}",a)).show(),I[O.loop||a-1>j?"show":"hide"]().html(O.next),K[O.loop||j?"show":"hide"]().html(O.previous),O.slideshow&&R.show(),O.preloading&&t.each([r(-1),r(1)],function(){var i,o,n=E[this],r=t.data(n,Z);r&&r.href?(i=r.href,t.isFunction(i)&&(i=i.call(n))):i=t(n).attr("href"),i&&h(r,i)&&(i=s(r,i),o=e.createElement("img"),o.src=i)})):B.hide(),O.iframe?(n=o("iframe")[0],u in n&&(n[u]=0),p in n&&(n[p]="true"),O.scrolling||(n.scrolling="no"),t(n).attr({src:O.href,name:(new Date).getTime(),"class":te+"Iframe",allowFullScreen:!0,webkitAllowFullScreen:!0,mozallowfullscreen:!0}).one("load",l).appendTo(W),se.one(he,function(){n.src="//about:blank"}),O.fastIframe&&t(n).trigger("load")):l(),"fade"===O.transition?v.fadeTo(d,1,i):i())},"fade"===O.transition?v.fadeTo(d,0,function(){J.position(0,a)}):J.position(d,a)}},J.next=function(){!q&&E[1]&&(O.loop||E[j+1])&&(j=r(1),p(E[j]))},J.prev=function(){!q&&E[1]&&(O.loop||j)&&(j=r(-1),p(E[j]))},J.close=function(){$&&!G&&(G=!0,$=!1,c(re,O.onCleanup),H.unbind("."+te),g.fadeTo(O.fadeOut||0,0),v.stop().fadeTo(O.fadeOut||0,0,function(){v.add(g).css({opacity:1,cursor:"auto"}).hide(),c(he),W.empty().remove(),setTimeout(function(){G=!1,c(le,O.onClosed)},1)}))},J.remove=function(){v&&(v.stop(),t.colorbox.close(),v.stop().remove(),g.remove(),G=!1,v=null,t("."+ee).removeData(Z).removeClass(ee),t(e).unbind("click."+te))},J.element=function(){return t(A)},J.settings=Y)})(jQuery,document,window); 1033 1034$( 1035 function() 1036 { 1037 // The minimum inner width 1038 var minInnerWidth = 300; 1039 1040 // Is there currently a title 1041 var hasResized = false; 1042 1043 // Init colorbox 1044 $('.colorbox').colorbox( 1045 { 1046 // Since we cannot set this only for a single .resize() we need to ensure never transition 1047 "transition" : "none", 1048 1049 // Opacity of overlay (#000) 1050 "opacity" : 0.75, 1051 1052 // Max dimensions in relation to window 1053 "maxHeight" : "90%", 1054 "maxWidth" : "90%", 1055 1056 // Button labels (well HTML actually) 1057 "previous" : "<span>«</span><strong>previous</strong>", 1058 "next" : "<strong>next</strong><span>»</span>", 1059 "close" : "<strong>close</strong><span>x</span>", 1060 1061 // Resize to minInnerWidth 1062 "onComplete" : function() 1063 { 1064 var resize = {}; 1065 1066 // Check if it complies with minInnerWidth 1067 if ($('#cboxPhoto').width() < minInnerWidth) 1068 { 1069 resize.innerWidth = minInnerWidth; 1070 } 1071 1072 $("#cboxTitle").hide(); 1073 1074 // Get title parts 1075 var titleParts = $(this).attr('rev').split('##'); 1076 1077 // Insert after image 1078 $('<div id="cboxTitle">'+(titleParts[1] ? '<p><strong>'+titleParts[0]+'</strong></p>' : '')+'<p>'+(titleParts[1] || titleParts[0])+'</p></div>').insertAfter("#cboxPhoto"); 1079 1080 // Resize 1081 $.fn.colorbox.resize(resize); 1082 } 1083 } 1084 ); 1085 } 1086); 1087 1088$(function(){ 1089 var $notice = $('.overlay-notice') 1090 if($notice.length > 0){ 1091 $notice.prependTo(document.body) 1092 $notice.click(function(){ 1093 $notice.slideUp() 1094 }) 1095 setTimeout(function(){ 1096 $notice.slideUp() 1097 }, 30000) 1098 1099 } 1100 $('#cookie_alert').prependTo(document.body).css('position', 'static') 1101 1102 if(typeof theme_preview != 'undefined'){ 1103 $(document).on('click', 'a[href^="http"]', function(e) { 1104 if(typeof ipback_url == 'undefined'){ 1105 ipback_url = 'https://sitebuilder.freeola.com' 1106 } 1107 var href = $(this).attr('href') 1108 if(href.indexOf(ipback_url) == -1 && href.indexOf(location.hostname) == -1){ 1109 e.preventDefault() 1110 $.colorbox({ 1111 inline: true, 1112 href:$('<div style="width: 475px; color: #111;" class="modal"><div class="section heading"><h1>External link clicked</h1><div class="clear"></div></div><div class="content"><p>Whilst using the InstantPro Theme Selector external pages cannot be visited.</p><div class="buttons"><a class="closebutton right" href="#" onclick="$.colorbox.close(); return false;">Close</a><div class="clear"></div></div></div></div>') 1113 }) 1114 return false 1115 } 1116 }); 1117 1118 $('#show_category, #show_subcategory').unbind('change') 1119 window.parent.postMessage(window.location.href, "*") 1120 } 1121})
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.