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