1pippity_start = function() 2{ 3 window.$j = jQuery; 4 $j(function(){ 5 var url = location.href; 6 pty.wmode(); 7 pty.testing = url.indexOf('pty_test') > -1; 8 pty.now = url.indexOf('pty_open') > -1; 9 pty.ePops = pty.eventPopups(); 10 if( 11 !(($j('#pty_nopop').length || pty.m())) 12 || pty.ePops.length 13 || (pty.testing || pty.now) 14 ){ 15 pty.load(url); 16 } 17 }); 18 window.pty = { 19 load: function(url){ 20 pty.do_hook('loading'); 21 var loadPops = ''; 22 if (pty.ePops.length) { 23 loadPops = '&loadPopups='+pty.ePops.join(','); 24 } 25 var href = encodeURIComponent(location.href.replace(location.hash, '').replace('http://', '').replace('https://', '')); 26 var ref = encodeURIComponent(document.referrer.replace('http://', '').replace('https://', '')); 27 var hash = location.hash.substr(1).length ? location.hash.substr(1) : 'empty'; 28 var url = PTY_AJAX+'?action=pty_getActive&incoming_ajax=true&ref='+ref+'&href='+href+'&url='+hash+loadPops; 29 var s = document.createElement('script'); 30 s.id = 'pty_w'; 31 s.src = url; 32 s.text = 'text/javascript'; 33 document.getElementsByTagName('head')[0].appendChild(s); 34 }, 35 eventPopups: function(){ 36 var ids = []; 37 $j('.pty_click').each(function(){ 38 var id = pty.getID($j(this)); 39 if (id !== undefined) { 40 ids.push(id); 41 } 42 }); 43 return ids; 44 }, 45 getID: function(elm){ 46 var classes = elm.attr('class').split(' '); 47 var id = false; 48 $j.each(classes, function(i, v){ 49 if (v.indexOf('pty_id') > -1) { 50 var b = v.split('_'); 51 id = b[2]; 52 } 53 }); 54 return id; 55 }, 56 add_hook: function(hook, fnc) { 57 if (pty.hooks[hook] == undefined) { 58 pty.hooks[hook] = function(){fnc();}; 59 } 60 else { 61 var existing = pty.hooks[hook]; 62 pty.hooks[hook] = function() {existing();fnc();}; 63 } 64 }, 65 do_hook: function(hook) { 66 if (pty.hooks[hook] != undefined) { 67 pty.hooks[hook](); 68 } 69 }, 70 m: function(){ 71 var uagent = navigator.userAgent.toLowerCase(); 72 var agents = ['ipad', 'iphone', 'ipod', 'android', 'iemobile', 'symbian']; 73 var ismobile = false; 74 $j.each(agents, function(i, v){ 75 if (uagent.indexOf(v) > -1) { 76 ismobile = true; 77 } 78 }); 79 return ismobile; 80 }, 81 wmode: function() { 82 $j('iframe').each(function(){ 83 var src = $j(this).attr('src'); 84 if (src !== undefined && src.indexOf('youtube.') > -1 && src.indexOf('wmode') < 0) { 85 var pre = '?'; 86 if (src.indexOf('?') > -1) { 87 pre = '&'; 88 } 89 $j(this).attr('src', src+pre+'wmode=transparent'); 90 } 91 }); 92 $j('embed').each(function(){ 93 var $t = $j(this); 94 if ($t !== undefined && $t.length) { 95 var attr = $t.attr('wmode'); 96 if (attr === undefined || !attr) { 97 $t 98 .attr('wmode', 'transparent') 99 .css('position', 'relative') 100 .css('z-index', '1') 101 .css('display', 'block') 102 } 103 } 104 }); 105 }, 106 hooks: {} 107 } 108}()
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.