001.
<!DOCTYPE HTML>
002.
<html>
003.
<head>
004.
<meta http-equiv=
"Content-Type"
content=
"text/html; charset=utf-8"
>
005.
<title>Untitled Document</title>
007.
<script type=
"text/javascript"
src=
"jQuery-Paging/jquery.paging.min.js"
></script>
008.
<script type=
"text/javascript"
src=
"jQuery-Paging/jquery.xcolor.min.js"
></script>
009.
010.
<script>
011.
var
prev = {start: 0, stop: 0},
012.
cont = $(
'#content div.element'
);
013.
014.
$(
".pagination"
).paging(cont.length, {
015.
format:
'[< ncnnn! >]'
,
016.
perpage: 3,
017.
lapping: 0,
018.
page:
null
,
019.
onSelect:
function
(page) {
020.
021.
var
data =
this
.slice;
022.
023.
cont.slice(prev[0], prev[1]).css(
'display'
,
'none'
);
024.
cont.slice(data[0], data[1]).fadeIn(
"slow"
);
025.
026.
prev = data;
027.
028.
return
true
;
029.
},
030.
onFormat: formatCallback
031.
});
032.
033.
$(window).hashchange(
function
() {
034.
035.
if
(window.location.hash)
036.
Paging.setPage(window.location.hash.substr(1));
037.
else
038.
Paging.setPage(1);
039.
});
040.
041.
$(window).hashchange();
042.
</script>
043.
</head>
044.
<body>
045.
<div class=
"a"
>
046.
047.
<div class=
"pagination toppagination"
></div>
048.
049.
<div id=
"content"
>
050.
051.
<div style=
"color: rgb(255, 0, 0); display: block;"
class=
"element"
>
052.
<h5>Las Vegas</h5>
053.
<p>37°C / 98.6°F</p>
054.
</div>
055.
056.
<div style=
"color: rgb(236, 7, 18); display: block;"
class=
"element"
>
057.
<h5>Cairo</h5>
058.
<p>35°C / 95°F</p>
059.
</div>
060.
061.
<div style=
"color: rgb(218, 14, 36); display: block;"
class=
"element"
>
062.
<h5>Houston</h5>
063.
<p>33°C / 91.4°F</p>
064.
</div>
065.
066.
<div style=
"color: rgb(200, 21, 54); display: none;"
class=
"element"
>
067.
<h5>Madrid</h5>
068.
<p>31°C / 87.8°F</p>
069.
</div>
070.
071.
<div style=
"color: rgb(182, 29, 72); display: none;"
class=
"element"
>
072.
<h5>Athens</h5>
073.
<p>30°C / 86°F</p>
074.
</div>
075.
076.
<div style=
"color: rgb(163, 36, 91); display: none;"
class=
"element"
>
077.
<h5>Lisbon</h5>
078.
<p>27°C / 80.6°F</p>
079.
</div>
080.
081.
<div style=
"color: rgb(145, 43, 109); display: none;"
class=
"element"
>
082.
<h5>Rome</h5>
083.
<p>27°C / 80.6°F</p>
084.
</div>
085.
086.
<div style=
"color: rgb(127, 51, 127); display: none;"
class=
"element"
>
087.
<h5>Moscow</h5>
088.
<p>23°C / 73.4°F</p>
089.
</div>
090.
091.
<div style=
"color: rgb(109, 58, 145); display: none;"
class=
"element"
>
092.
<h5>Los Angeles</h5>
093.
<p>22°C / 71.6°F</p>
094.
</div>
095.
096.
<div style=
"color: rgb(91, 65, 163); display: none;"
class=
"element"
>
097.
<h5>San Francisco</h5>
098.
<p>22°C / 71.6°F</p>
099.
</div>
100.
101.
<div style=
"color: rgb(72, 72, 182); display: none;"
class=
"element"
>
102.
<h5>Lima</h5>
103.
<p>19°C / 66.2°F</p>
104.
</div>
105.
106.
<div style=
"color: rgb(54, 80, 200); display: none;"
class=
"element"
>
107.
<h5>Sydney</h5>
108.
<p>18°C / 64.4°F</p>
109.
</div>
110.
111.
<div style=
"color: rgb(36, 87, 218); display: none;"
class=
"element"
>
112.
<h5>Johannesburg</h5>
113.
<p>17°C / 62.6°F</p>
114.
</div>
115.
116.
<div style=
"color: rgb(18, 94, 236); display: none;"
class=
"element"
>
117.
<h5>Buenos Aires</h5>
118.
<p>16° / 60.8°F</p>
119.
</div>
120.
121.
</div>
122.
123.
<div class=
"pagination toppagination"
></div>
124.
</div>
125.
126.
<script type=
"text/javascript"
>
127.
128.
(
function
($, window) {
129.
130.
var
B1, B2, TABLE, CURTAB, STAT, PRIME =
new
Array();
131.
132.
var
Prev = {
133.
start: 0,
134.
stop: 0
135.
}, TabPage, Paging = [], CONT;
136.
137.
138.
window.toggle =
function
(id) {
139.
140.
$(
'#'
+ id).slideToggle(
"slow"
,
function
() {});
141.
}
142.
143.
window.setNumber =
function
(num) {
144.
145.
TabPage.setOptions({
146.
page: 1
147.
});
148.
TabPage.setNumber(num);
149.
TabPage.setPage();
150.
151.
for
(
var
i = Paging.length; --i; ) {
152.
Paging[i].setOptions({
153.
lapping: lap,
154.
page: 1
155.
});
156.
Paging[i].setNumber(num);
157.
Paging[i].setPage();
158.
}
159.
$(
'.number'
).html(num);
160.
}
161.
162.
window.setLapping =
function
(lap) {
163.
164.
TabPage.setOptions({
165.
lapping: lap * 4,
166.
page: 1
167.
});
168.
TabPage.setPage();
169.
170.
for
(
var
i = Paging.length; i--; ) {
171.
Paging[i].setOptions({
172.
lapping: lap,
173.
page: 1
174.
});
175.
Paging[i].setPage();
176.
}
177.
$(
'.lapping'
).html(lap);
178.
}
179.
180.
window.setPageStyle =
function
(style) {
181.
182.
$(
"link"
).each(
function
() {
183.
184.
var
href =
this
.getAttribute(
'href'
);
185.
186.
if
(href && href.substr(0,
"/static/pagination/"
.length) ==
"/static/pagination/"
) {
187.
this
.setAttribute(
'href'
,
'/static/pagination/'
+ style +
".css"
);
188.
}
189.
});
190.
}
191.
192.
$(
function
() {
193.
194.
195.
196.
197.
var
k = 0;
198.
199.
CONT = $(
'#content div.element'
),
200.
201.
TABLE = $(
'#table tr'
),
202.
B1 = $(
'#b1'
),
203.
B2 = $(
'#b2'
),
204.
STAT = $(
'#stat'
),
205.
206.
CONT.each(
function
() {
207.
$(
this
).css(
'color'
, $.xcolor.gradientlevel(
'#f00'
,
'hsb(216,180,100)'
, k++, CONT.length));
208.
});
209.
210.
Paging[0] = $(
".a .toppagination"
).paging(CONT.length, {
211.
onSelect:
function
() {
212.
213.
var
data =
this
.slice;
214.
215.
CONT.slice(Prev[0], Prev[1]).css(
'display'
,
'none'
);
216.
CONT.slice(data[0], data[1]).fadeIn(
"slow"
);
217.
218.
Prev = data;
219.
220.
return
true
;
221.
},
222.
onFormat:
function
(type) {
223.
224.
switch
(type) {
225.
226.
case
'block'
:
227.
228.
if
(!
this
.active)
229.
return
'<span class="disabled">'
+
this
.value +
'</span>'
;
230.
else
if
(
this
.value !=
this
.page)
231.
return
'<em><a href="#'
+
this
.value +
'">'
+
this
.value +
'</a></em>'
;
232.
return
'<span class="current">'
+
this
.value +
'</span>'
;
233.
234.
case
'right'
:
235.
case
'left'
:
236.
237.
if
(!
this
.active) {
238.
return
''
;
239.
}
240.
return
'<a href="#'
+
this
.value +
'">'
+
this
.value +
'</a>'
;
241.
242.
case
'next'
:
243.
244.
if
(
this
.active) {
245.
return
'<a href="#'
+
this
.value +
'" class="next">Next »</a>'
;
246.
}
247.
return
'<span class="disabled">Next »</span>'
;
248.
249.
case
'prev'
:
250.
251.
if
(
this
.active) {
252.
return
'<a href="#'
+
this
.value +
'" class="prev">« Previous</a>'
;
253.
}
254.
return
'<span class="disabled">« Previous</span>'
;
255.
256.
case
'first'
:
257.
258.
if
(
this
.active) {
259.
return
'<a href="#'
+
this
.value +
'" class="first">|<</a>'
;
260.
}
261.
return
'<span class="disabled">|<</span>'
;
262.
263.
case
'last'
:
264.
265.
if
(
this
.active) {
266.
return
'<a href="#'
+
this
.value +
'" class="prev">>|</a>'
;
267.
}
268.
return
'<span class="disabled">>|</span>'
;
269.
270.
case
'fill'
:
271.
if
(
this
.active) {
272.
return
"..."
;
273.
}
274.
}
275.
return
""
;
276.
},
277.
format:
'[< ncnnn! >]'
,
278.
perpage: 3,
279.
lapping: 0,
280.
page:
null
281.
}),
282.
283.
284.
$(window).hashchange(
function
() {
285.
286.
if
(window.location.hash)
287.
Paging[0].setPage(window.location.hash.substr(1));
288.
else
289.
Paging[0].setPage(1);
290.
});
291.
292.
$(window).hashchange();
293.
294.
295.
296.
297.
298.
B1.click(
function
() {
299.
TabPage.setPage(CURTAB - 1);
300.
}),
301.
302.
B2.click(
function
() {
303.
TabPage.setPage(CURTAB + 1);
304.
}),
305.
306.
TabPage = $(
"#tabpage"
).change(
function
() {
307.
TabPage.setPage($(
this
).val());
308.
}).paging(100, {
309.
onSelect:
function
(page) {
310.
311.
var
k =
this
.slice[0];
312.
var
data =
this
;
313.
314.
TABLE.each(
function
(i) {
315.
316.
$(
this
).find(
"td"
).each(
function
(j){
317.
318.
if
(j >= 1) {
319.
320.
if
(k < data.number) {
321.
var
str =
""
;
322.
323.
if
(0 === PRIME[k]) {
324.
325.
this
.style.color =
'#ccc'
326.
}
else
{
327.
328.
this
.style.color =
'#000'
;
329.
330.
if
(PRIME[k] & 1) {
331.
332.
str+=
'P'
;
333.
}
334.
335.
if
(PRIME[k] & 2) {
336.
337.
str+=
'F'
;
338.
}
339.
340.
if
(PRIME[k] & 4) {
341.
342.
str+=
'E'
;
343.
}
344.
345.
if
(PRIME[k] & 8) {
346.
347.
str+=
"B"
;
348.
}
349.
350.
if
(PRIME[k] & 16) {
351.
352.
str+=
"T"
;
353.
}
354.
}
355.
356.
this
.innerHTML =
"<span>"
+ k +
"</span><sub> "
+ str +
"</sub>"
;
357.
}
else
{
358.
this
.style.color =
'#000'
;
359.
this
.innerHTML=
"<span> </span><sub></sub>"
;
360.
}
361.
362.
++k;
363.
}
else
364.
this
.innerHTML =
'<span>'
+ (i + (40 - data.lapping) * (page - 1) / 4) +
'</span>'
;
365.
366.
});
367.
368.
});
369.
370.
371.
STAT.html(
'('
+
this
.slice[0] +
' - '
+ (
this
.slice[1] - 1) +
')'
);
372.
373.
return
false
;
374.
},
375.
onFormat:
function
(type) {
376.
377.
switch
(type) {
378.
379.
case
'prev'
:
380.
CURTAB =
this
.page;
381.
B1.attr(
'disabled'
, !
this
.active);
382.
break
;
383.
384.
case
'next'
:
385.
CURTAB =
this
.page;
386.
B2.attr(
'disabled'
, !
this
.active);
387.
break
;
388.
389.
case
'fill'
:
390.
391.
break
;
392.
393.
case
'block'
:
394.
395.
if
(!
this
.active)
396.
return
'<option class="disabled">'
+
this
.value +
'</option>'
;
397.
else
if
(
this
.value !=
this
.page)
398.
return
'<option>'
+
this
.value +
'</option>'
;
399.
return
'<option style="font-weight:bold;" selected="selected">'
+
this
.value +
'</option>'
;
400.
}
401.
return
""
;
402.
},
403.
format:
'<.> *'
,
404.
perpage: 40,
405.
lapping: 0,
406.
page: 0
407.
});
408.
409.
410.
411.
412.
var
ok = 0, scroll = $(
'#scroll'
);
413.
414.
scroll.find(
'a'
).each(
function
(i) {
415.
$(
this
).delay(i * 200).fadeIn((1 + i) * 300,
function
() {
416.
417.
if
(5 == ++ok) {
418.
419.
scroll.paging(5, {
420.
page: 1,
421.
perpage: 1,
422.
format:
'nnnnn'
,
423.
onFormat:
function
() {
424.
425.
if
(
this
.page ==
this
.value)
426.
return
'<a class="current"></a>'
;
427.
return
'<a ></a>'
;
428.
},
429.
onSelect:
function
(page) {
430.
431.
if
(window.SCROLLED)
432.
$.scrollTo(
'#ex'
+ page, 800, {
433.
easing:
'easeOutBounce'
434.
});
435.
window.SCROLLED = 1;
436.
return
false
;
437.
}
438.
});
439.
}
440.
441.
442.
});
443.
});
444.
445.
446.
447.
448.
var
selectedImg =
null
;
449.
451.
tags:
"city,nature"
,
452.
format:
"json"
453.
},
454.
function
(data) {
455.
456.
$.each(data.items,
function
(i, item) {
457.
458.
459.
var
rotateCSS =
'rotate('
+ (Math.random() * 30 - 15) +
'deg)'
;
460.
461.
$(
"<img/>"
)
462.
.attr(
'src'
, item.media.m)
463.
.css({
464.
'-moz-transform'
: rotateCSS,
465.
'-webkit-transform'
: rotateCSS,
466.
'-o-transform'
: rotateCSS,
467.
'transform'
: rotateCSS
468.
})
469.
.css(
'top'
, i * 10 +
"px"
)
470.
.appendTo(
"#images"
);
471.
472.
});
473.
474.
475.
$(
'#imagepager'
).paging(20,{
476.
477.
onSelect:
function
(page) {
478.
479.
$(
"#imageshadow"
).animate({
480.
left: ((page-1)*19-2) +
"px"
481.
});
482.
483.
484.
if
(
null
!== selectedImg) {
485.
$(
'#images'
).find(
"img"
).eq(selectedImg).animate({
486.
left:
'0px'
487.
},
function
() {
488.
$(
'#images'
).find(
"img"
).eq(page-1).animate({
489.
left:
'400px'
490.
});
491.
});
492.
}
else
{
493.
$(
'#images'
).find(
"img"
).eq(page-1).animate({
494.
left:
'400px'
495.
});
496.
}
497.
498.
selectedImg = page-1;
499.
500.
return
false
;
501.
},
502.
onFormat:
function
() {
503.
504.
if
(
this
.value !=
this
.page)
505.
return
'<a style="left:'
+((
this
.pos-1)*19)+
'px;" href="#'
+
this
.value +
'"></a>'
;
506.
return
'<span style="left:'
+((
this
.pos-1)*19)+
'px;background-color:#fc0;"></span>'
;
507.
},
508.
format:
'*'
,
509.
perpage: 1,
510.
page:1
511.
});
512.
513.
});
514.
515.
516.
517.
518.
var
formats = [
519.
520.
'{
521.
number: 1000,\n\
522.
options: {\n\
523.
format:
"[ < > ] . (qq -) nnncnnn (- pp)"
,\n\
524.
lapping: 1,\n\
525.
perpage: 8,\n\
526.
},\n\
527.
labels: {\n\
528.
first:
"First"
,\n\
529.
leap:
" "
,\n\
530.
last:
"Last"
,\n\
531.
prev:
"<"
,\n\
532.
next:
">"
,\n\
533.
fill:
"..."
\n\
534.
}\n\
535.
}',
536.
'{
537.
number: 30,\n\
538.
options: {\n\
539.
format:
"< nnnnnnn! >"
\n\
540.
},\n\
541.
labels: {\n\
542.
prev:
"« prev"
,\n\
543.
next:
"next »"
\n\
544.
}\n\
545.
}',
546.
'{
547.
number: 4,\n\
548.
options: {\n\
549.
format:
"<> nnnnnnnnn"
,\n\
550.
perpage: 1\n\
551.
},\n\
552.
labels: {\n\
553.
prev:
"<"
,\n\
554.
next:
">"
\n\
555.
}\n\
556.
}',
557.
'{
558.
number: 50,\n\
559.
options: {\n\
560.
format:
"[< - nncn - >]"
\n\
561.
},\n\
562.
labels: {\n\
563.
first:
"|<<"
,\n\
564.
last:
">>|"
,\n\
565.
prev:
"< Prev"
,\n\
566.
next:
"Next >"
,\n\
567.
fill:
" - "
,\n\
568.
}\n\
569.
}',
570.
'{
571.
number: 11220,\n\
572.
options: {\n\
573.
format:
"- < (qq -) ncnnnnnn (- pp) >"
\n\
574.
},\n\
575.
labels: {\n\
576.
fill:
function
(data) {\n\
577.
if
(data.pos > 1)\n\
578.
return
"..."
;\n\
579.
return
"PAGE "
+ data.page +
" OF "
+ data.pages;\n\
580.
},\n\
581.
prev:
"<"
,\n\
582.
next:
">"
\n\
583.
}\n\
584.
}',
585.
'{
586.
number: 50,\n\
587.
options: {\n\
588.
format:
". < - >"
\n\
589.
},\n\
590.
labels: {\n\
591.
leap:
function
(data) {\n\
592.
return
"PAGE "
+ data.page +
" OF "
+ data.pages;\n\
593.
},\n\
594.
fill:
" | "
,\n\
595.
prev:
"<Older"
,\n\
596.
next:
"Newer>"
\n\
597.
}\n\
598.
}',
599.
'{
600.
number: 341,\n\
601.
options: {\n\
602.
format:
"< . (q -) nnnnn (- p) . >"
\n\
603.
},\n\
604.
labels: {\n\
605.
leap:
function
(data) {\n\
606.
if
(data.pos == 1)\n\
607.
return
" | Page: "
+ data.page +
" "
;\n\
608.
return
" | "
;\n\
609.
},\n\
610.
fill:
"..."
,\n\
611.
prev:
"<Back"
,\n\
612.
next:
"Forward>"
\n\
613.
}\n\
614.
}',
615.
'{
616.
number: 50,\n\
617.
hideInactive:
true
,\n\
618.
options: {\n\
619.
format:
"< * >"
\n\
620.
},\n\
621.
labels: {\n\
622.
prev:
"Prev"
,\n\
623.
next:
"Next"
\n\
624.
}\n\
625.
}',
626.
'{
627.
number: 99,\n\
628.
options: {\n\
629.
format:
"*"
,\n\
630.
},\n\
631.
labels: {\n\
632.
current:
"x"
,\n\
633.
number:
"o"
\n\
634.
}\n\
635.
}',
636.
'{
637.
number: 57,\n\
638.
options: {\n\
639.
format:
"< * >"
\n\
640.
},\n\
641.
labels: {\n\
642.
prev:
"prev"
,\n\
643.
next:
"next"
,\n\
644.
current:
function
(data) {\n\
645.
var
u, l = 1 + (u = data.value * (data.perpage - data.lapping) + data.lapping) - data.perpage;\n\
646.
u = Math.min(u, data.number);\n\
647.
return
"<strong>["
+ l +
"-"
+ u +
"]</strong>"
;\n\
648.
},\n\
649.
number:
function
(data) {\n\
650.
var
u, l = 1 + (u = data.value * (data.perpage - data.lapping) + data.lapping) - data.perpage;\n\
651.
u = Math.min(u, data.number);\n\
652.
return
"["
+ l +
"-"
+ u +
"]"
;\n\
653.
}\n\
654.
}\n\
655.
}'];
656.
657.
658.
659.
$(
"#formatlinks a"
).each(
function
(i) {
660.
661.
$(
this
).click(
function
() {
662.
663.
$(
"#formatex"
).val(formats[i]);
664.
ForExCB.apply($(
"#formatex"
));
665.
});
666.
667.
});
668.
669.
function
parseOptions(value) {
670.
671.
try
{
672.
var
res = eval(
"("
+ value +
")"
);
673.
$(
"#formatex"
).css(
"background"
,
"#fff"
);
674.
}
catch
(e) {
675.
$(
"#formatex"
).css(
"background"
,
"#c00"
);
676.
return
;
677.
}
678.
679.
if
(!(res.options && res.labels))
return
;
680.
681.
var
ret = {
682.
raw: res,
683.
options: {
684.
lapping: 0,
685.
perpage: 10,
686.
onFormat:
function
(type) {
687.
688.
if
(!
this
.active && res.hideInactive)
689.
return
""
;
690.
691.
var
value;
692.
693.
if
(type ==
"block"
) {
694.
if
(
this
.value ==
this
.page) {
695.
if
(
typeof
res.labels.current ===
"string"
)
696.
value = res.labels.current;
697.
else
if
(
typeof
res.labels.current ===
"function"
)
698.
value = res.labels.current(
this
);
699.
}
else
{
700.
if
(
typeof
res.labels.number ===
"string"
)
701.
value = res.labels.number;
702.
else
if
(
typeof
res.labels.number ===
"function"
)
703.
value = res.labels.number(
this
);
704.
}
705.
}
else
{
706.
if
(
typeof
res.labels[type] ===
"string"
)
707.
value = res.labels[type];
708.
else
if
(
typeof
res.labels[type] ===
"function"
)
709.
value = res.labels[type](
this
);
710.
}
711.
712.
713.
714.
switch
(type) {
715.
716.
case
'block'
:
717.
if
(!
this
.active)
718.
return
'<span class="disabled">'
+ (value ||
this
.value) +
'</span>'
;
719.
else
if
(
this
.value !=
this
.page)
720.
return
'<em><a href="#'
+
this
.value +
'">'
+ (value ||
this
.value) +
'</a></em>'
;
721.
return
'<span class="current">'
+ (value ||
this
.value) +
'</span>'
;
722.
723.
case
'right'
:
724.
case
'left'
:
725.
726.
if
(!
this
.active) {
727.
return
''
;
728.
}
729.
return
'<a href="#'
+
this
.value +
'">'
+ (value ||
this
.value) +
'</a>'
;
730.
731.
case
'next'
:
732.
733.
if
(
this
.active) {
734.
return
'<a href="#'
+
this
.value +
'" class="next">'
+ (value ||
'Next »'
) +
'</a>'
;
735.
}
736.
return
'<span class="disabled">'
+ (value ||
'Next »'
) +
'</span>'
;
737.
738.
case
'prev'
:
739.
740.
if
(
this
.active) {
741.
return
'<a href="#'
+
this
.value +
'" class="prev">'
+ (value ||
'« Previous'
) +
'</a>'
;
742.
}
743.
return
'<span class="disabled">'
+ (value ||
'« Previous'
) +
'</span>'
;
744.
745.
case
'first'
:
746.
747.
if
(
this
.active) {
748.
return
'<a href="#'
+
this
.value +
'" class="first">'
+ (value ||
'|<'
) +
'</a>'
;
749.
}
750.
return
'<span class="disabled">'
+ (value ||
"|<"
) +
'</span>'
;
751.
752.
case
'last'
:
753.
754.
if
(
this
.active) {
755.
return
'<a href="#'
+
this
.value +
'" class="prev">'
+ (value||
">|"
) +
'</a>'
;
756.
}
757.
return
'<span class="disabled">'
+ (value||
">|"
) +
'</span>'
;
758.
759.
case
"leap"
:
760.
case
'fill'
:
761.
if
(
this
.active) {
762.
return
value||
"..."
;
763.
}
764.
}
765.
return
""
;
766.
},
767.
onSelect:
function
() {
768.
return
false
;
769.
},
770.
page: 1,
771.
format:
"[< nncnn > ]"
772.
},
773.
number: 100
774.
};
775.
776.
$.extend(ret.options, res.options);
777.
778.
if
(res.options)
779.
ret.number = res.number;
780.
781.
return
ret;
782.
}
783.
784.
var
ForTPL =
null
, ForExCB, ForExample = $(
"#formatex"
);
785.
786.
ForExample.ready(ForExCB =
function
() {
787.
788.
var
tmp;
789.
790.
if
(ForTPL ===
null
) {
791.
ForTPL = document.getElementById(
"forpaging"
).innerHTML;
792.
$(
"#forpaging"
).addClass(
"prettyprint"
);
793.
794.
tmp = parseOptions(formats[0]);
795.
796.
}
else
{
797.
tmp = parseOptions($(
this
).val());
798.
}
799.
800.
if
(tmp) {
801.
ForPaging.setOptions(tmp.options);
802.
ForPaging.setNumber(tmp.number)
803.
ForPaging.setPage(tmp.page);
804.
805.
var
tpl = ForTPL.replace(/\[\[\[number\]\]\]/g, tmp.number)
806.
.replace(/\[\[\[format\]\]\]/g, tmp.options.format)
807.
.replace(/\[\[\[perpage\]\]\]/g,tmp.options.perpage)
808.
.replace(/\[\[\[page\]\]\]/g, tmp.options.page)
809.
.replace(/\[\[\[lapping\]\]\]/g,tmp.options.lapping);
810.
811.
var
alt = {
812.
current:
"' + this.value + '"
,
813.
number:
"' + this.value + '"
,
814.
next:
"Next >"
,
815.
prev:
"< Prev"
,
816.
first:
"|<"
,
817.
last:
">|"
,
818.
leap:
"..."
,
819.
fill:
"..."
820.
};
821.
822.
$(
"#forpaging"
).html(
823.
tpl.replace(/\[\[(current|number|next|prev|first|last|leap|fill)\]\]/g,
function
() {
824.
var
m = RegExp.$1;
825.
826.
return
(tmp.raw.labels[m] === undefined ? alt[m] : tmp.raw.labels[m]);
827.
})
828.
);
829.
830.
prettyPrint();
831.
}
832.
833.
}).change(ForExCB).keyup(ForExCB);
834.
835.
ForExample.val(formats[0]);
836.
837.
var
$opt = parseOptions(formats[0]);
838.
839.
var
ForPaging = $(
".formatpagination"
).paging($opt.number, $opt.options);
840.
841.
});
842.
843.
844.
845.
846.
var
i,j;
847.
for
(i = 10000; i--; PRIME[i] = 1);
848.
for
(i = 2; i <= 100; ++i)
849.
if
(PRIME[i])
850.
for
(j = i; j * i < 10000; ++j)
851.
PRIME[i * j] = 0;
852.
853.
PRIME[0] = PRIME[1] = 2;
854.
j = [2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584, 4181, 6765];
855.
856.
for
(i = j.length; i--; PRIME[j[i]]|= 2);
857.
858.
PRIME[6]|= 4;
859.
PRIME[28]|= 4;
860.
PRIME[496]|= 4;
861.
PRIME[8128]|= 4;
862.
863.
for
(i=1; i<10000; i<<=1) {
864.
PRIME[i]|= 8;
865.
}
866.
867.
for
(i=1; i<10000; i*=10) {
868.
PRIME[i]|= 16;
869.
}
870.
871.
})(jQuery,
this
);
872.
873.
</script>
874.
</body>
875.
</html>