01.
<script type=
"text/javascript"
src=
"js/prototype.js"
></script>
02.
<script type=
"text/javascript"
src=
"js/lightbox_form.js"
></script>
03.
04.
<script type=
"text/javascript"
src=
"js/slider_image.js"
></script><!--สำหรับทำสไลด์รูป-->
05.
<script type=
"text/javascript"
>
06.
var
$j
= jQuery.noConflict();
07.
$j
(document).ready(
function
() {
08.
09.
10.
slideShow();
11.
12.
});
13.
14.
function
slideShow() {
15.
var
$j
= jQuery.noConflict();
16.
17.
$j
(
'#gallery a'
).css({opacity: 0.0});
18.
19.
20.
$j
(
'#gallery a:first'
).css({opacity: 1.0});
21.
22.
23.
$j
(
'#gallery .caption'
).css({opacity: 0.7});
24.
25.
26.
$j
(
'#gallery .caption'
).css({width:
$j
(
'#gallery a'
).find(
'img'
).css(
'width'
)});
27.
28.
29.
$j
(
'#gallery .content'
).html(
$j
(
'#gallery a:first'
).find(
'img'
).attr(
'rel'
))
30.
.animate({opacity: 0.7}, 400);
31.
32.
33.
setInterval(
'gallery()'
,6000);
34.
35.
}
36.
37.
function
gallery() {
38.
var
$j
= jQuery.noConflict();
39.
40.
var
current = (
$j
(
'#gallery a.show'
)?
$j
(
'#gallery a.show'
) :
$j
(
'#gallery a:first'
));
41.
42.
43.
var
next = ((current.next().length) ? ((current.next().hasClass(
'caption'
))?
$j
(
'#gallery a:first'
) :current.next()) :
$j
(
'#gallery a:first'
));
44.
45.
46.
var
caption = next.find(
'img'
).attr(
'rel'
);
47.
48.
49.
next.css({opacity: 0.0})
50.
.addClass(
'show'
)
51.
.animate({opacity: 1.0}, 1000);
52.
53.
54.
current.animate({opacity: 0.0}, 1000)
55.
.removeClass(
'show'
);
56.
57.
58.
$j
(
'#gallery .caption'
).animate({opacity: 0.0}, { queue:false, duration:0 }).animate({height:
'1px'
}, { queue:true, duration:300 });
59.
60.
61.
$j
(
'#gallery .caption'
).animate({opacity: 0.7},100 ).animate({height:
'100px'
},500 );
62.
63.
64.
$j
(
'#gallery .content'
).html(caption);
65.
66.
67.
}
68.
</script>