1(function (jQuery) { 2 /* 3 * jQuery Color Animations 4 * Copyright 2007 John Resig 5 * Released under the MIT and GPL licenses. 6 */ 7 8// We override the animation for all of these color styles 9 jQuery.each(['backgroundColor', 'borderBottomColor', 'borderLeftColor', 'borderRightColor', 'borderTopColor', 'color', 'outlineColor'], function (i, attr) { 10 jQuery.fx.step[attr] = function (fx) { 11 if (fx.state == 0) { 12 fx.start = getColor(fx.elem, attr); 13 fx.end = getRGB(fx.end); 14 } 15 16 fx.elem.style[attr] = "rgb(" + [ 17 Math.max(Math.min(parseInt((fx.pos * (fx.end[0] - fx.start[0])) + fx.start[0]), 255), 0), 18 Math.max(Math.min(parseInt((fx.pos * (fx.end[1] - fx.start[1])) + fx.start[1]), 255), 0), 19 Math.max(Math.min(parseInt((fx.pos * (fx.end[2] - fx.start[2])) + fx.start[2]), 255), 0) 20 ].join(",") + ")"; 21 } 22 }); 23 24// Color Conversion functions from highlightFade 25// By Blair Mitchelmore 26// http://jquery.offput.ca/highlightFade/ 27 28// Parse strings looking for color tuples [255,255,255] 29 function getRGB(color) { 30 var result; 31 32 // Check if we're already dealing with an array of colors 33 if (color && color.constructor == Array && color.length == 3) 34 return color; 35 36 // Look for rgb(num,num,num) 37 if (result = /rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(color)) 38 return [parseInt(result[1]), parseInt(result[2]), parseInt(result[3])]; 39 40 // Look for rgb(num%,num%,num%) 41 if (result = /rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(color)) 42 return [parseFloat(result[1]) * 2.55, parseFloat(result[2]) * 2.55, parseFloat(result[3]) * 2.55]; 43 44 // Look for #a0b1c2 45 if (result = /#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(color)) 46 return [parseInt(result[1], 16), parseInt(result[2], 16), parseInt(result[3], 16)]; 47 48 // Look for #fff 49 if (result = /#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(color)) 50 return [parseInt(result[1] + result[1], 16), parseInt(result[2] + result[2], 16), parseInt(result[3] + result[3], 16)]; 51 52 // Look for rgba(0, 0, 0, 0) == transparent in Safari 3 53 if (result = /rgba\(0, 0, 0, 0\)/.exec(color)) 54 return colors['transparent'] 55 56 // Otherwise, we're most likely dealing with a named color 57 return colors[jQuery.trim(color).toLowerCase()]; 58 } 59 60 function getColor(elem, attr) { 61 var color; 62 63 do { 64 color = jQuery.curCSS(elem, attr); 65 66 // Keep going until we find an element that has color, or we hit the body 67 if (color != '' && color != 'transparent' || jQuery.nodeName(elem, "body")) 68 break; 69 70 attr = "backgroundColor"; 71 } while (elem = elem.parentNode); 72 73 return getRGB(color); 74 }; 75 76// Some named colors to work with 77// From Interface by Stefan Petre 78// http://interface.eyecon.ro/ 79 80 var colors = { 81 aqua: [0, 255, 255], 82 azure: [240, 255, 255], 83 beige: [245, 245, 220], 84 black: [0, 0, 0], 85 blue: [0, 0, 255], 86 brown: [165, 42, 42], 87 cyan: [0, 255, 255], 88 darkblue: [0, 0, 139], 89 darkcyan: [0, 139, 139], 90 darkgrey: [169, 169, 169], 91 darkgreen: [0, 100, 0], 92 darkkhaki: [189, 183, 107], 93 darkmagenta: [139, 0, 139], 94 darkolivegreen: [85, 107, 47], 95 darkorange: [255, 140, 0], 96 darkorchid: [153, 50, 204], 97 darkred: [139, 0, 0], 98 darksalmon: [233, 150, 122], 99 darkviolet: [148, 0, 211], 100 fuchsia: [255, 0, 255], 101 gold: [255, 215, 0], 102 green: [0, 128, 0], 103 indigo: [75, 0, 130], 104 khaki: [240, 230, 140], 105 lightblue: [173, 216, 230], 106 lightcyan: [224, 255, 255], 107 lightgreen: [144, 238, 144], 108 lightgrey: [211, 211, 211], 109 lightpink: [255, 182, 193], 110 lightyellow: [255, 255, 224], 111 lime: [0, 255, 0], 112 magenta: [255, 0, 255], 113 maroon: [128, 0, 0], 114 navy: [0, 0, 128], 115 olive: [128, 128, 0], 116 orange: [255, 165, 0], 117 pink: [255, 192, 203], 118 purple: [128, 0, 128], 119 violet: [128, 0, 128], 120 red: [255, 0, 0], 121 silver: [192, 192, 192], 122 white: [255, 255, 255], 123 yellow: [255, 255, 0],
124 transparent: [255, 255, 255] 125 }; 126})(jQuery); 127; 128(function ($) { 129 var currentRadius, multiplier; 130 131 function parseOptions(options) { 132 return { 133 RADIUS: (options.radius || 20), 134 DURATION: (options.duration || 500), 135 TEXT_COLOR: (options.textColor || '#fff'), 136 HALO_COLOR: (options.haloColor || '#777') 137 } 138 } 139 140 function currentRadius(elem) { 141 if (prop = elem.style['text-shadow']) { 142 return parseInt(prop.match(/0 0 (\d+)px/)); 143 } else { 144 return 0; 145 } 146 } 147 148 function stepTextShadow(fx) { 149 if (fx.state == 0) { 150 fx.start = currentRadius(fx.elem); 151 } 152 153 updatedRadius = fx.end.begin ? 154 parseInt(fx.end.radius * fx.pos) : 155 parseInt(fx.end.radius - (fx.end.radius * fx.pos)) 156 157 if (fx.end.begin || (fx.state < 1)) { 158 $(fx.elem).css('text-shadow', fx.end.color + ' 0 0 ' + updatedRadius + 'px'); 159 } else { 160 $(fx.elem).css('text-shadow', $(fx.elem).data('glow.originalGlow')); 161 } 162 } 163 164 function addGlow(opts) { 165 var opts = parseOptions(opts || {}); 166 167 function startGlow() { 168 $(this).stop().animate({ 169 color: opts.TEXT_COLOR, 170 textShadow: { 171 begin: true, 172 color: opts.HALO_COLOR, 173 radius: opts.RADIUS 174 } 175 }, opts.DURATION); 176 } 177 178 function startFade() { 179 $(this).stop().animate({ 180 color: $(this).data('glow.originColor'), 181 textShadow: { 182 begin: false, 183 color: opts.HALO_COLOR, 184 radius: opts.RADIUS 185 } 186 }, opts.DURATION); 187 } 188 189 with ($(this)) { 190 bind('mouseenter', startGlow); 191 bind('mouseleave', startFade); 192 data('glow.originColor', css('color')); 193 data('glow.originalGlow', (css('text-shadow') || 'none')); 194 } 195 196 return this; 197 } 198 199 $.fx.step['textShadow'] = stepTextShadow; 200 $.fn.addGlow = addGlow; 201})(jQuery); 202; 203(function ($) { 204 Drupal.behaviors.superfish = { 205 attach: function (context) { 206 207 function mobile_menu(w, searchForm) { 208 var breakpoint; 209 // console.log(Drupal.settings.cni.menu_break_point); 210 // because some sites (San Marcos) are on their own theme, so cni breaks 211 // needs fixing at some point to find 212 if (typeof Drupal.settings.cni !== 'undefined') { 213 breakpoint = Drupal.settings.cni.menu_break_point; 214 } else { 215 breakpoint = 767; 216 } 217 var wrapper = $('#mobile-menu-wrapper'); 218 219 if (w > breakpoint) { 220 if (wrapper.length > 0) { 221 wrapper.remove(); 222 searchForm.show(); 223 } 224 } 225 else { 226 if (wrapper.length === 0) { 227 $('.region-user-menu').prepend('<div id="mobile-menu-wrapper"><div id="mobile-menu-control"></div><ul id="mobile-menu" class="menu"></ul></div>'); 228 229 searchForm.hide(); 230 $('#superfish-1 li').clone().appendTo($('#mobile-menu')); 231 $('#block-system-user-menu ul.menu li').clone().appendTo($('#mobile-menu')); 232 $('#mobile-menu li ul').remove(); 233 $('#mobile-menu-control').click(function () { 234 $('#mobile-menu').toggle() 235 }); 236 237 } 238 } 239 } 240 241 var searchForm = $('#search-block-form'); 242 var search = $('#search-control'); 243 if (search.length === 0) { 244 $('#block-search-form .content').append('<div id="search-control"></div>'); 245 search = $('#search-control'); 246 } 247 248 $(search).click(function () { 249 searchForm.toggle(); 250 if (searchForm.is(':visible')) { 251 $('#edit-search-block-form--2').focus(); 252 } 253 }); 254 255 var w = $(window).width(); 256 mobile_menu(w, searchForm); 257 258 $(window).resize(function () { 259 var w = $(window).width(); 260 mobile_menu(w, searchForm); 261 }); 262 } 263 }; 264 265 Drupal.behaviors.cni = { 266 attach: function (context) { 267 $("li.views-fluid-grid-item") 268 .mouseenter( 269 function () { 270 $(this).find('.overlay').css('display', 'none'); 271 }) 272 .mouseleave( 273 function () { 274 $(this).find('.overlay').css('display', 'block'); 275 }); 276 } 277 }; 278 279})(jQuery); 280;
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.