Guest User

owensinclairjones

a guest
Nov 24th, 2013
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 16.44 KB | None | 0 0
  1. <script type="text/javascript">
  2. if(typeof Object.create!=="function"){
  3. Object.create=function(o){
  4. function F(){
  5. };
  6. F.prototype=o;
  7. return new F();
  8. };
  9. }
  10. var ua={toString:function(){
  11. return navigator.userAgent;
  12. },test:function(s){
  13. return this.toString().toLowerCase().indexOf(s.toLowerCase())>-1;
  14. }};
  15. ua.version=(ua.toString().toLowerCase().match(/[\s\S]+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[])[1];
  16. ua.webkit=ua.test("webkit");
  17. ua.gecko=ua.test("gecko")&&!ua.webkit;
  18. ua.opera=ua.test("opera");
  19. ua.ie=ua.test("msie")&&!ua.opera;
  20. ua.ie6=ua.ie&&document.compatMode&&typeof document.documentElement.style.maxHeight==="undefined";
  21. ua.ie7=ua.ie&&document.documentElement&&typeof document.documentElement.style.maxHeight!=="undefined"&&typeof XDomainRequest==="undefined";
  22. ua.ie8=ua.ie&&typeof XDomainRequest!=="undefined";
  23. var domReady=function(){
  24. var _1=[];
  25. var _2=function(){
  26. if(!arguments.callee.done){
  27. arguments.callee.done=true;
  28. for(var i=0;i<_1.length;i++){
  29. _1[i]();
  30. }
  31. }
  32. };
  33. if(document.addEventListener){
  34. document.addEventListener("DOMContentLoaded",_2,false);
  35. }
  36. if(ua.ie){
  37. (function(){
  38. try{
  39. document.documentElement.doScroll("left");
  40. }
  41. catch(e){
  42. setTimeout(arguments.callee,50);
  43. return;
  44. }
  45. _2();
  46. })();
  47. document.onreadystatechange=function(){
  48. if(document.readyState==="complete"){
  49. document.onreadystatechange=null;
  50. _2();
  51. }
  52. };
  53. }
  54. if(ua.webkit&&document.readyState){
  55. (function(){
  56. if(document.readyState!=="loading"){
  57. _2();
  58. }else{
  59. setTimeout(arguments.callee,10);
  60. }
  61. })();
  62. }
  63. window.onload=_2;
  64. return function(fn){
  65. if(typeof fn==="function"){
  66. _1[_1.length]=fn;
  67. }
  68. return fn;
  69. };
  70. }();
  71. var cssHelper=function(){
  72. var _3={BLOCKS:/[^\s{][^{]*\{(?:[^{}]*\{[^{}]*\}[^{}]*|[^{}]*)*\}/g,BLOCKS_INSIDE:/[^\s{][^{]*\{[^{}]*\}/g,DECLARATIONS:/[a-zA-Z\-]+[^;]*:[^;]+;/g,RELATIVE_URLS:/url\(['"]?([^\/\)'"][^:\)'"]+)['"]?\)/g,REDUNDANT_COMPONENTS:/(?:\/\*([^*\\\\]|\*(?!\/))+\*\/|@import[^;]+;)/g,REDUNDANT_WHITESPACE:/\s*(,|:|;|\{|\})\s*/g,MORE_WHITESPACE:/\s{2,}/g,FINAL_SEMICOLONS:/;\}/g,NOT_WHITESPACE:/\S+/g};
  73. var _4,_5=false;
  74. var _6=[];
  75. var _7=function(fn){
  76. if(typeof fn==="function"){
  77. _6[_6.length]=fn;
  78. }
  79. };
  80. var _8=function(){
  81. for(var i=0;i<_6.length;i++){
  82. _6[i](_4);
  83. }
  84. };
  85. var _9={};
  86. var _a=function(n,v){
  87. if(_9[n]){
  88. var _b=_9[n].listeners;
  89. if(_b){
  90. for(var i=0;i<_b.length;i++){
  91. _b[i](v);
  92. }
  93. }
  94. }
  95. };
  96. var _c=function(_d,_e,_f){
  97. if(ua.ie&&!window.XMLHttpRequest){
  98. window.XMLHttpRequest=function(){
  99. return new ActiveXObject("Microsoft.XMLHTTP");
  100. };
  101. }
  102. if(!XMLHttpRequest){
  103. return "";
  104. }
  105. var r=new XMLHttpRequest();
  106. try{
  107. r.open("get",_d,true);
  108. r.setRequestHeader("X_REQUESTED_WITH","XMLHttpRequest");
  109. }
  110. catch(e){
  111. _f();
  112. return;
  113. }
  114. var _10=false;
  115. setTimeout(function(){
  116. _10=true;
  117. },5000);
  118. document.documentElement.style.cursor="progress";
  119. r.onreadystatechange=function(){
  120. if(r.readyState===4&&!_10){
  121. if(!r.status&&location.protocol==="file:"||(r.status>=200&&r.status<300)||r.status===304||navigator.userAgent.indexOf("Safari")>-1&&typeof r.status==="undefined"){
  122. _e(r.responseText);
  123. }else{
  124. _f();
  125. }
  126. document.documentElement.style.cursor="";
  127. r=null;
  128. }
  129. };
  130. r.send("");
  131. };
  132. var _11=function(_12){
  133. _12=_12.replace(_3.REDUNDANT_COMPONENTS,"");
  134. _12=_12.replace(_3.REDUNDANT_WHITESPACE,"$1");
  135. _12=_12.replace(_3.MORE_WHITESPACE," ");
  136. _12=_12.replace(_3.FINAL_SEMICOLONS,"}");
  137. return _12;
  138. };
  139. var _13={mediaQueryList:function(s){
  140. var o={};
  141. var idx=s.indexOf("{");
  142. var lt=s.substring(0,idx);
  143. s=s.substring(idx+1,s.length-1);
  144. var mqs=[],rs=[];
  145. var qts=lt.toLowerCase().substring(7).split(",");
  146. for(var i=0;i<qts.length;i++){
  147. mqs[mqs.length]=_13.mediaQuery(qts[i],o);
  148. }
  149. var rts=s.match(_3.BLOCKS_INSIDE);
  150. if(rts!==null){
  151. for(i=0;i<rts.length;i++){
  152. rs[rs.length]=_13.rule(rts[i],o);
  153. }
  154. }
  155. o.getMediaQueries=function(){
  156. return mqs;
  157. };
  158. o.getRules=function(){
  159. return rs;
  160. };
  161. o.getListText=function(){
  162. return lt;
  163. };
  164. o.getCssText=function(){
  165. return s;
  166. };
  167. return o;
  168. },mediaQuery:function(s,mql){
  169. s=s||"";
  170. var not=false,_14;
  171. var exp=[];
  172. var _15=true;
  173. var _16=s.match(_3.NOT_WHITESPACE);
  174. for(var i=0;i<_16.length;i++){
  175. var _17=_16[i];
  176. if(!_14&&(_17==="not"||_17==="only")){
  177. if(_17==="not"){
  178. not=true;
  179. }
  180. }else{
  181. if(!_14){
  182. _14=_17;
  183. }else{
  184. if(_17.charAt(0)==="("){
  185. var _18=_17.substring(1,_17.length-1).split(":");
  186. exp[exp.length]={mediaFeature:_18[0],value:_18[1]||null};
  187. }
  188. }
  189. }
  190. }
  191. return {getList:function(){
  192. return mql||null;
  193. },getValid:function(){
  194. return _15;
  195. },getNot:function(){
  196. return not;
  197. },getMediaType:function(){
  198. return _14;
  199. },getExpressions:function(){
  200. return exp;
  201. }};
  202. },rule:function(s,mql){
  203. var o={};
  204. var idx=s.indexOf("{");
  205. var st=s.substring(0,idx);
  206. var ss=st.split(",");
  207. var ds=[];
  208. var dts=s.substring(idx+1,s.length-1).split(";");
  209. for(var i=0;i<dts.length;i++){
  210. ds[ds.length]=_13.declaration(dts[i],o);
  211. }
  212. o.getMediaQueryList=function(){
  213. return mql||null;
  214. };
  215. o.getSelectors=function(){
  216. return ss;
  217. };
  218. o.getSelectorText=function(){
  219. return st;
  220. };
  221. o.getDeclarations=function(){
  222. return ds;
  223. };
  224. o.getPropertyValue=function(n){
  225. for(var i=0;i<ds.length;i++){
  226. if(ds[i].getProperty()===n){
  227. return ds[i].getValue();
  228. }
  229. }
  230. return null;
  231. };
  232. return o;
  233. },declaration:function(s,r){
  234. var idx=s.indexOf(":");
  235. var p=s.substring(0,idx);
  236. var v=s.substring(idx+1);
  237. return {getRule:function(){
  238. return r||null;
  239. },getProperty:function(){
  240. return p;
  241. },getValue:function(){
  242. return v;
  243. }};
  244. }};
  245. var _19=function(el){
  246. if(typeof el.cssHelperText!=="string"){
  247. return;
  248. }
  249. var o={mediaQueryLists:[],rules:[],selectors:{},declarations:[],properties:{}};
  250. var _1a=o.mediaQueryLists;
  251. var ors=o.rules;
  252. var _1b=el.cssHelperText.match(_3.BLOCKS);
  253. if(_1b!==null){
  254. for(var i=0;i<_1b.length;i++){
  255. if(_1b[i].substring(0,7)==="@media "){
  256. _1a[_1a.length]=_13.mediaQueryList(_1b[i]);
  257. ors=o.rules=ors.concat(_1a[_1a.length-1].getRules());
  258. }else{
  259. ors[ors.length]=_13.rule(_1b[i]);
  260. }
  261. }
  262. }
  263. var oss=o.selectors;
  264. var _1c=function(r){
  265. var ss=r.getSelectors();
  266. for(var i=0;i<ss.length;i++){
  267. var n=ss[i];
  268. if(!oss[n]){
  269. oss[n]=[];
  270. }
  271. oss[n][oss[n].length]=r;
  272. }
  273. };
  274. for(i=0;i<ors.length;i++){
  275. _1c(ors[i]);
  276. }
  277. var ods=o.declarations;
  278. for(i=0;i<ors.length;i++){
  279. ods=o.declarations=ods.concat(ors[i].getDeclarations());
  280. }
  281. var ops=o.properties;
  282. for(i=0;i<ods.length;i++){
  283. var n=ods[i].getProperty();
  284. if(!ops[n]){
  285. ops[n]=[];
  286. }
  287. ops[n][ops[n].length]=ods[i];
  288. }
  289. el.cssHelperParsed=o;
  290. _4[_4.length]=el;
  291. return o;
  292. };
  293. var _1d=function(el,s){
  294. el.cssHelperText=_11(s||el.innerHTML);
  295. return _19(el);
  296. };
  297. var _1e=function(){
  298. _5=true;
  299. _4=[];
  300. var _1f=[];
  301. var _20=function(){
  302. for(var i=0;i<_1f.length;i++){
  303. _19(_1f[i]);
  304. }
  305. var _21=document.getElementsByTagName("style");
  306. for(i=0;i<_21.length;i++){
  307. _1d(_21[i]);
  308. }
  309. _5=false;
  310. _8();
  311. };
  312. var _22=document.getElementsByTagName("link");
  313. for(var i=0;i<_22.length;i++){
  314. var _23=_22[i];
  315. if(_23.getAttribute("rel").indexOf("style")>-1&&_23.href&&_23.href.length!==0&&!_23.disabled){
  316. _1f[_1f.length]=_23;
  317. }
  318. }
  319. if(_1f.length>0){
  320. var c=0;
  321. var _24=function(){
  322. c++;
  323. if(c===_1f.length){
  324. _20();
  325. }
  326. };
  327. var _25=function(_26){
  328. var _27=_26.href;
  329. _c(_27,function(_28){
  330. _28=_11(_28).replace(_3.RELATIVE_URLS,"url("+_27.substring(0,_27.lastIndexOf("/"))+"/$1)");
  331. _26.cssHelperText=_28;
  332. _24();
  333. },_24);
  334. };
  335. for(i=0;i<_1f.length;i++){
  336. _25(_1f[i]);
  337. }
  338. }else{
  339. _20();
  340. }
  341. };
  342. var _29={mediaQueryLists:"array",rules:"array",selectors:"object",declarations:"array",properties:"object"};
  343. var _2a={mediaQueryLists:null,rules:null,selectors:null,declarations:null,properties:null};
  344. var _2b=function(_2c,v){
  345. if(_2a[_2c]!==null){
  346. if(_29[_2c]==="array"){
  347. return (_2a[_2c]=_2a[_2c].concat(v));
  348. }else{
  349. var c=_2a[_2c];
  350. for(var n in v){
  351. if(v.hasOwnProperty(n)){
  352. if(!c[n]){
  353. c[n]=v[n];
  354. }else{
  355. c[n]=c[n].concat(v[n]);
  356. }
  357. }
  358. }
  359. return c;
  360. }
  361. }
  362. };
  363. var _2d=function(_2e){
  364. _2a[_2e]=(_29[_2e]==="array")?[]:{};
  365. for(var i=0;i<_4.length;i++){
  366. _2b(_2e,_4[i].cssHelperParsed[_2e]);
  367. }
  368. return _2a[_2e];
  369. };
  370. domReady(function(){
  371. var els=document.body.getElementsByTagName("*");
  372. for(var i=0;i<els.length;i++){
  373. els[i].checkedByCssHelper=true;
  374. }
  375. if(document.implementation.hasFeature("MutationEvents","2.0")||window.MutationEvent){
  376. document.body.addEventListener("DOMNodeInserted",function(e){
  377. var el=e.target;
  378. if(el.nodeType===1){
  379. _a("DOMElementInserted",el);
  380. el.checkedByCssHelper=true;
  381. }
  382. },false);
  383. }else{
  384. setInterval(function(){
  385. var els=document.body.getElementsByTagName("*");
  386. for(var i=0;i<els.length;i++){
  387. if(!els[i].checkedByCssHelper){
  388. _a("DOMElementInserted",els[i]);
  389. els[i].checkedByCssHelper=true;
  390. }
  391. }
  392. },1000);
  393. }
  394. });
  395. var _2f=function(d){
  396. if(typeof window.innerWidth!="undefined"){
  397. return window["inner"+d];
  398. }else{
  399. if(typeof document.documentElement!="undefined"&&typeof document.documentElement.clientWidth!="undefined"&&document.documentElement.clientWidth!=0){
  400. return document.documentElement["client"+d];
  401. }
  402. }
  403. };
  404. return {addStyle:function(s,_30){
  405. var el=document.createElement("style");
  406. el.setAttribute("type","text/css");
  407. document.getElementsByTagName("head")[0].appendChild(el);
  408. if(el.styleSheet){
  409. el.styleSheet.cssText=s;
  410. }else{
  411. el.appendChild(document.createTextNode(s));
  412. }
  413. el.addedWithCssHelper=true;
  414. if(typeof _30==="undefined"||_30===true){
  415. cssHelper.parsed(function(_31){
  416. var o=_1d(el,s);
  417. for(var n in o){
  418. if(o.hasOwnProperty(n)){
  419. _2b(n,o[n]);
  420. }
  421. }
  422. _a("newStyleParsed",el);
  423. });
  424. }else{
  425. el.parsingDisallowed=true;
  426. }
  427. return el;
  428. },removeStyle:function(el){
  429. return el.parentNode.removeChild(el);
  430. },parsed:function(fn){
  431. if(_5){
  432. _7(fn);
  433. }else{
  434. if(typeof _4!=="undefined"){
  435. if(typeof fn==="function"){
  436. fn(_4);
  437. }
  438. }else{
  439. _7(fn);
  440. _1e();
  441. }
  442. }
  443. },mediaQueryLists:function(fn){
  444. cssHelper.parsed(function(_32){
  445. fn(_2a.mediaQueryLists||_2d("mediaQueryLists"));
  446. });
  447. },rules:function(fn){
  448. cssHelper.parsed(function(_33){
  449. fn(_2a.rules||_2d("rules"));
  450. });
  451. },selectors:function(fn){
  452. cssHelper.parsed(function(_34){
  453. fn(_2a.selectors||_2d("selectors"));
  454. });
  455. },declarations:function(fn){
  456. cssHelper.parsed(function(_35){
  457. fn(_2a.declarations||_2d("declarations"));
  458. });
  459. },properties:function(fn){
  460. cssHelper.parsed(function(_36){
  461. fn(_2a.properties||_2d("properties"));
  462. });
  463. },broadcast:_a,addListener:function(n,fn){
  464. if(typeof fn==="function"){
  465. if(!_9[n]){
  466. _9[n]={listeners:[]};
  467. }
  468. _9[n].listeners[_9[n].listeners.length]=fn;
  469. }
  470. },removeListener:function(n,fn){
  471. if(typeof fn==="function"&&_9[n]){
  472. var ls=_9[n].listeners;
  473. for(var i=0;i<ls.length;i++){
  474. if(ls[i]===fn){
  475. ls.splice(i,1);
  476. i-=1;
  477. }
  478. }
  479. }
  480. },getViewportWidth:function(){
  481. return _2f("Width");
  482. },getViewportHeight:function(){
  483. return _2f("Height");
  484. }};
  485. }();
  486. domReady(function enableCssMediaQueries(){
  487. var _37;
  488. var _38={LENGTH_UNIT:/[0-9]+(em|ex|px|in|cm|mm|pt|pc)$/,RESOLUTION_UNIT:/[0-9]+(dpi|dpcm)$/,ASPECT_RATIO:/^[0-9]+\/[0-9]+$/,ABSOLUTE_VALUE:/^[0-9]*(\.[0-9]+)*$/};
  489. var _39=[];
  490. var _3a=function(){
  491. var id="css3-mediaqueries-test";
  492. var el=document.createElement("div");
  493. el.id=id;
  494. var _3b=cssHelper.addStyle("@media all and (width) { #"+id+" { width: 1px !important; } }",false);
  495. document.body.appendChild(el);
  496. var ret=el.offsetWidth===1;
  497. _3b.parentNode.removeChild(_3b);
  498. el.parentNode.removeChild(el);
  499. _3a=function(){
  500. return ret;
  501. };
  502. return ret;
  503. };
  504. var _3c=function(){
  505. _37=document.createElement("div");
  506. _37.style.cssText="position:absolute;top:-9999em;left:-9999em;"+"margin:0;border:none;padding:0;width:1em;font-size:1em;";
  507. document.body.appendChild(_37);
  508. if(_37.offsetWidth!==16){
  509. _37.style.fontSize=16/_37.offsetWidth+"em";
  510. }
  511. _37.style.width="";
  512. };
  513. var _3d=function(_3e){
  514. _37.style.width=_3e;
  515. var _3f=_37.offsetWidth;
  516. _37.style.width="";
  517. return _3f;
  518. };
  519. var _40=function(_41,_42){
  520. var l=_41.length;
  521. var min=(_41.substring(0,4)==="min-");
  522. var max=(!min&&_41.substring(0,4)==="max-");
  523. if(_42!==null){
  524. var _43;
  525. var _44;
  526. if(_38.LENGTH_UNIT.exec(_42)){
  527. _43="length";
  528. _44=_3d(_42);
  529. }else{
  530. if(_38.RESOLUTION_UNIT.exec(_42)){
  531. _43="resolution";
  532. _44=parseInt(_42,10);
  533. var _45=_42.substring((_44+"").length);
  534. }else{
  535. if(_38.ASPECT_RATIO.exec(_42)){
  536. _43="aspect-ratio";
  537. _44=_42.split("/");
  538. }else{
  539. if(_38.ABSOLUTE_VALUE){
  540. _43="absolute";
  541. _44=_42;
  542. }else{
  543. _43="unknown";
  544. }
  545. }
  546. }
  547. }
  548. }
  549. var _46,_47;
  550. if("device-width"===_41.substring(l-12,l)){
  551. _46=screen.width;
  552. if(_42!==null){
  553. if(_43==="length"){
  554. return ((min&&_46>=_44)||(max&&_46<_44)||(!min&&!max&&_46===_44));
  555. }else{
  556. return false;
  557. }
  558. }else{
  559. return _46>0;
  560. }
  561. }else{
  562. if("device-height"===_41.substring(l-13,l)){
  563. _47=screen.height;
  564. if(_42!==null){
  565. if(_43==="length"){
  566. return ((min&&_47>=_44)||(max&&_47<_44)||(!min&&!max&&_47===_44));
  567. }else{
  568. return false;
  569. }
  570. }else{
  571. return _47>0;
  572. }
  573. }else{
  574. if("width"===_41.substring(l-5,l)){
  575. _46=document.documentElement.clientWidth||document.body.clientWidth;
  576. if(_42!==null){
  577. if(_43==="length"){
  578. return ((min&&_46>=_44)||(max&&_46<_44)||(!min&&!max&&_46===_44));
  579. }else{
  580. return false;
  581. }
  582. }else{
  583. return _46>0;
  584. }
  585. }else{
  586. if("height"===_41.substring(l-6,l)){
  587. _47=document.documentElement.clientHeight||document.body.clientHeight;
  588. if(_42!==null){
  589. if(_43==="length"){
  590. return ((min&&_47>=_44)||(max&&_47<_44)||(!min&&!max&&_47===_44));
  591. }else{
  592. return false;
  593. }
  594. }else{
  595. return _47>0;
  596. }
  597. }else{
  598. if("device-aspect-ratio"===_41.substring(l-19,l)){
  599. return _43==="aspect-ratio"&&screen.width*_44[1]===screen.height*_44[0];
  600. }else{
  601. if("color-index"===_41.substring(l-11,l)){
  602. var _48=Math.pow(2,screen.colorDepth);
  603. if(_42!==null){
  604. if(_43==="absolute"){
  605. return ((min&&_48>=_44)||(max&&_48<_44)||(!min&&!max&&_48===_44));
  606. }else{
  607. return false;
  608. }
  609. }else{
  610. return _48>0;
  611. }
  612. }else{
  613. if("color"===_41.substring(l-5,l)){
  614. var _49=screen.colorDepth;
  615. if(_42!==null){
  616. if(_43==="absolute"){
  617. return ((min&&_49>=_44)||(max&&_49<_44)||(!min&&!max&&_49===_44));
  618. }else{
  619. return false;
  620. }
  621. }else{
  622. return _49>0;
  623. }
  624. }else{
  625. if("resolution"===_41.substring(l-10,l)){
  626. var res;
  627. if(_45==="dpcm"){
  628. res=_3d("1cm");
  629. }else{
  630. res=_3d("1in");
  631. }
  632. if(_42!==null){
  633. if(_43==="resolution"){
  634. return ((min&&res>=_44)||(max&&res<_44)||(!min&&!max&&res===_44));
  635. }else{
  636. return false;
  637. }
  638. }else{
  639. return res>0;
  640. }
  641. }else{
  642. return false;
  643. }
  644. }
  645. }
  646. }
  647. }
  648. }
  649. }
  650. }
  651. };
  652. var _4a=function(mq){
  653. var _4b=mq.getValid();
  654. var _4c=mq.getExpressions();
  655. var l=_4c.length;
  656. if(l>0){
  657. for(var i=0;i<l&&_4b;i++){
  658. _4b=_40(_4c[i].mediaFeature,_4c[i].value);
  659. }
  660. var not=mq.getNot();
  661. return (_4b&&!not||not&&!_4b);
  662. }
  663. };
  664. var _4d=function(mql){
  665. var mqs=mql.getMediaQueries();
  666. var t={};
  667. for(var i=0;i<mqs.length;i++){
  668. if(_4a(mqs[i])){
  669. t[mqs[i].getMediaType()]=true;
  670. }
  671. }
  672. var s=[],c=0;
  673. for(var n in t){
  674. if(t.hasOwnProperty(n)){
  675. if(c>0){
  676. s[c++]=",";
  677. }
  678. s[c++]=n;
  679. }
  680. }
  681. if(s.length>0){
  682. _39[_39.length]=cssHelper.addStyle("@media "+s.join("")+"{"+mql.getCssText()+"}",false);
  683. }
  684. };
  685. var _4e=function(_4f){
  686. for(var i=0;i<_4f.length;i++){
  687. _4d(_4f[i]);
  688. }
  689. if(ua.ie){
  690. document.documentElement.style.display="block";
  691. setTimeout(function(){
  692. document.documentElement.style.display="";
  693. },0);
  694. setTimeout(function(){
  695. cssHelper.broadcast("cssMediaQueriesTested");
  696. },100);
  697. }else{
  698. cssHelper.broadcast("cssMediaQueriesTested");
  699. }
  700. };
  701. var _50=function(){
  702. for(var i=0;i<_39.length;i++){
  703. cssHelper.removeStyle(_39[i]);
  704. }
  705. _39=[];
  706. cssHelper.mediaQueryLists(_4e);
  707. };
  708. var _51=0;
  709. var _52=function(){
  710. var _53=cssHelper.getViewportWidth();
  711. var _54=cssHelper.getViewportHeight();
  712. if(ua.ie){
  713. var el=document.createElement("div");
  714. el.style.position="absolute";
  715. el.style.top="-9999em";
  716. el.style.overflow="scroll";
  717. document.body.appendChild(el);
  718. _51=el.offsetWidth-el.clientWidth;
  719. document.body.removeChild(el);
  720. }
  721. var _55;
  722. var _56=function(){
  723. var vpw=cssHelper.getViewportWidth();
  724. var vph=cssHelper.getViewportHeight();
  725. if(Math.abs(vpw-_53)>_51||Math.abs(vph-_54)>_51){
  726. _53=vpw;
  727. _54=vph;
  728. clearTimeout(_55);
  729. _55=setTimeout(function(){
  730. if(!_3a()){
  731. _50();
  732. }else{
  733. cssHelper.broadcast("cssMediaQueriesTested");
  734. }
  735. },500);
  736. }
  737. };
  738. window.onresize=function(){
  739. var x=window.onresize||function(){
  740. };
  741. return function(){
  742. x();
  743. _56();
  744. };
  745. }();
  746. };
  747. var _57=document.documentElement;
  748. _57.style.marginLeft="-32767px";
  749. setTimeout(function(){
  750. _57.style.marginTop="";
  751. },20000);
  752. return function(){
  753. if(!_3a()){
  754. cssHelper.addListener("newStyleParsed",function(el){
  755. _4e(el.cssHelperParsed.mediaQueryLists);
  756. });
  757. cssHelper.addListener("cssMediaQueriesTested",function(){
  758. if(ua.ie){
  759. _57.style.width="1px";
  760. }
  761. setTimeout(function(){
  762. _57.style.width="";
  763. _57.style.marginLeft="";
  764. },0);
  765. cssHelper.removeListener("cssMediaQueriesTested",arguments.callee);
  766. });
  767. _3c();
  768. _50();
  769. }else{
  770. _57.style.marginLeft="";
  771. }
  772. _52();
  773. };
  774. }());
  775. try{
  776. document.execCommand("BackgroundImageCache",false,true);
  777. }
  778. catch(e){
  779. }
  780. </script>
Advertisement
Add Comment
Please, Sign In to add comment