1/* 2 * Copyright 2012 Anyware Services 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17/* begin Page */ 18/* Created by Artisteer v3.0.0.41778 */ 19jQuery(function(){jQuery('#art-page-background-glare').css('zoom',1)}); 20 21// css hacks 22(function($) { 23 // fix ie blinking 24 var m = document.uniqueID && document.compatMode && !window.XMLHttpRequest && document.execCommand; 25 try { if (!!m) { m('BackgroundImageCache', false, true); } } 26 catch (oh) { }; 27 // css helper 28 var data = [ 29 {str:navigator.userAgent,sub:'Chrome',ver:'Chrome',name:'chrome'}, 30 {str:navigator.vendor,sub:'Apple',ver:'Version',name:'safari'}, 31 {prop:window.opera,ver:'Opera',name:'opera'}, 32 {str:navigator.userAgent,sub:'Firefox',ver:'Firefox',name:'firefox'}, 33 {str:navigator.userAgent,sub:'MSIE',ver:'MSIE',name:'ie'}]; 34 for (var n=0;n<data.length;n++) { 35 if ((data[n].str && (data[n].str.indexOf(data[n].sub) != -1)) || data[n].prop) { 36 var v = function(s){var i=s.indexOf(data[n].ver);return (i!=-1)?parseInt(s.substring(i+data[n].ver.length+1)):'';}; 37 $('html').addClass(data[n].name+' '+data[n].name+v(navigator.userAgent) || v(navigator.appVersion)); break; 38 } 39 } 40})(jQuery); 41 42var _artStyleUrlCached = null; 43function artGetStyleUrl() { 44 if (null == _artStyleUrlCached) { 45 var ns; 46 _artStyleUrlCached = ''; 47 ns = jQuery('link'); 48 for (var i = 0; i < ns.length; i++) { 49 var l = ns[i].href; 50 if (l && /style\.ie6\.css(\?.*)?$/.test(l)) 51 return _artStyleUrlCached = l.replace(/style\.ie6\.css(\?.*)?$/, ''); 52 } 53 ns = jQuery('style'); 54 for (var i = 0; i < ns.length; i++) { 55 var matches = new RegExp('import\\s+"([^"]+\\/)style\\.ie6\\.css"').exec(ns[i].html()); 56 if (null != matches && matches.length > 0) 57 return _artStyleUrlCached = matches[1]; 58 } 59 } 60 return _artStyleUrlCached; 61} 62 63function artFixPNG(element) {
64 if (jQuery.browser.msie && parseInt(jQuery.browser.version) < 7) { 65 var src; 66 if (element.tagName == 'IMG') { 67 if (/\.png$/.test(element.src)) { 68 src = element.src; 69 element.src = artGetStyleUrl() + 'images/spacer.gif'; 70 } 71 } 72 else { 73 src = element.currentStyle.backgroundImage.match(/url\("(.+\.png)"\)/i); 74 if (src) { 75 src = src[1]; 76 element.runtimeStyle.backgroundImage = 'none'; 77 } 78 } 79 if (src) element.runtimeStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + src + "')"; 80 } 81} 82 83jQuery(function() { 84 jQuery.each(jQuery('ul.art-hmenu>li:not(.art-hmenu-li-separator),ul.art-vmenu>li:not(.art-vmenu-separator)'), function (i, val) { 85 var l = jQuery(val); var s = l.children('span'); if (s.length == 0) return; 86 var t = l.find('span.t').last(); l.children('a').append(t.html(t.text())); 87 s.remove(); 88 }); 89}); 90 91function artFixPNG(element) { 92 if (jQuery.browser.msie && parseInt(jQuery.browser.version) < 7) { 93 var src; 94 if (element.tagName == 'IMG') { 95 if (/\.png$/.test(element.src)) { 96 src = element.src; 97 element.src = artGetStyleUrl() + 'img/spacer.gif'; 98 } 99 } 100 else { 101 src = element.currentStyle.backgroundImage.match(/url\("(.+\.png)"\)/i); 102 if (src) { 103 src = src[1]; 104 element.runtimeStyle.backgroundImage = 'none'; 105 } 106 } 107 if (src) element.runtimeStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + src + "')"; 108 } 109} 110 111jQuery(function() 112 { 113 function enter() 114 { 115 jQuery(this).addClass("hover"); 116 } 117 function leave() 118 { 119 jQuery(this).removeClass("hover"); 120 } 121 122 jQuery('div.results ul > li').mouseenter(enter).mouseleave(leave); 123 } 124);/* end Page */ 125 126/* begin Box, Sheet */ 127 128function artFluidSheetComputedWidth(percent, minval, maxval) { 129 percent = parseInt(percent); 130 var val = document.body.clientWidth / 100 * percent; 131 return val < minval ? minval + 'px' : val > maxval ? maxval + 'px' : percent + '%'; 132}/* end Box, Sheet */ 133 134/* begin Menu */ 135jQuery(function() 136 { 137 jQuery.each(jQuery('ul.art-hmenu li a'), 138 function (i, val) 139 { 140 jQuery(val).focus(function() { jQuery(this).parents('li').addClass('hover'); }); 141 jQuery(val).blur(function() { jQuery(this).parents('li').removeClass('hover'); }); 142 } 143 ); 144
145 if (!jQuery.browser.msie || parseInt(jQuery.browser.version) > 6) return; 146 jQuery.each(jQuery('ul.art-hmenu li'), function(i, val) { 147 val.j = jQuery(val); 148 val.UL = val.j.children('ul:first'); 149 if (val.UL.length == 0) return; 150 val.A = val.j.children('a:first'); 151 this.onmouseenter = function() { 152 this.j.addClass('art-hmenuhover'); 153 this.UL.addClass('art-hmenuhoverUL'); 154 this.A.addClass('art-hmenuhoverA'); 155 }; 156 this.onmouseleave = function() { 157 this.j.removeClass('art-hmenuhover'); 158 this.UL.removeClass('art-hmenuhoverUL'); 159 this.A.removeClass('art-hmenuhoverA'); 160 }; 161 162 }); 163 } 164); 165 /* end Menu */ 166 167/* begin Layout */ 168jQuery(function () { 169 var c = jQuery('div.art-content'); 170 if (c.length !== 1) return; 171 var s = c.parent().children('.art-layout-cell:not(.art-content)'); 172 jQuery(window).bind('resize', function () { 173 c.css('height', 'auto'); 174 var r = jQuery(window).height() - jQuery('#art-main').height(); 175 if (r > 0) c.css('height', r + c.height() + 'px'); 176 }); 177
178 if (jQuery.browser.msie && parseInt(jQuery.browser.version) < 8) { 179 180 jQuery(window).bind('resize', function () { 181 var w = 0; 182 c.hide(); 183 s.each(function () { w += this.clientWidth; }); 184 c.w = c.parent().width(); c.css('width', c.w - w + 'px'); 185 c.show(); 186 }) 187 188 var r = jQuery('div.art-content-layout-row').each(function () { 189 this.c = jQuery(this).children('.art-layout-cell:not(.art-content)'); 190 }); 191 192 jQuery(window).bind('resize', function () { 193 r.each(function () { 194 if (this.h == this.clientHeight) return; 195 this.c.css('height', 'auto'); 196 var r = jQuery(window).height() - jQuery('#art-main').height(); 197 this.h = this.clientHeight; 198 if (r > 0) this.h += r; 199 this.c.css('height', this.h + 'px'); 200 }); 201 }); 202 } 203 204 var g = jQuery('.art-layout-glare-image'); 205 jQuery(window).bind('resize', function () { 206 g.each(function () { 207 var i = jQuery(this); 208 i.css('height', i.parents('.art-layout-cell').height() + 'px'); 209 }); 210 }); 211 212 jQuery(window).trigger('resize'); 213});/* end Layout */ 214 215/* begin VMenu */ 216jQuery(function() { 217 jQuery('ul.art-vmenu li').not(':first').before('<li class="art-vsubmenu-separator"><span class="art-vsubmenu-separator-span"> </span></li>'); 218 jQuery('ul.art-vmenu > li.art-vsubmenu-separator').removeClass('art-vsubmenu-separator').addClass('art-vmenu-separator').children('span').removeClass('art-vsubmenu-separator-span').addClass('art-vmenu-separator-span'); 219 jQuery('ul.art-vmenu > li > ul > li.art-vsubmenu-separator:first-child').removeClass('art-vsubmenu-separator').addClass('art-vmenu-separator').addClass('art-vmenu-separator-first').children('span').removeClass('art-vsubmenu-separator-span').addClass('art-vmenu-separator-span'); 220}); /* end VMenu */ 221 222/* begin Button */ 223function artButtonSetup(className) { 224 jQuery.each(jQuery("a." + className + ", button." + className + ", input." + className), function (i, val) { 225 var b = jQuery(val); 226 if (!b.parent().hasClass('art-button-wrapper')) { 227 if (b.is('input')) b.val(b.val().replace(/^\s*/, '')).css('zoom', '1'); 228 if (!b.hasClass('art-button')) b.addClass('art-button'); 229 jQuery("<span class='art-button-wrapper'><span class='art-button-l'> </span><span class='art-button-r'> </span></span>").insertBefore(b).append(b); 230 if (b.hasClass('active')) b.parent().addClass('active'); 231 } 232 b.mouseover(function () { jQuery(this).parent().addClass("hover"); }); 233 b.mouseout(function () { var b = jQuery(this); b.parent().removeClass("hover"); if (!b.hasClass('active')) b.parent().removeClass('active'); }); 234 b.mousedown(function () { var b = jQuery(this); b.parent().removeClass("hover"); if (!b.hasClass('active')) b.parent().addClass('active'); }); 235 b.mouseup(function () { var b = jQuery(this); if (!b.hasClass('active')) b.parent().removeClass('active'); }); 236 }); 237} 238jQuery(function() { artButtonSetup("art-button"); }); 239 240/* end Button */ 241
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.