source: trunk/www.guidonia.net/wp/wp-content/themes/blueleanmagazine/js/scripts.js@ 44

Last change on this file since 44 was 44, checked in by luciano, 14 years ago
File size: 1.2 KB
Line 
1var autoSlide = true;
2var autoSlideSecs = 10;
3
4var proj = 0;
5var interval = null;
6
7function textSlideIn(proj) {
8 $('ul.text').children('li:eq('+proj+')').animate({ right: "-1px" }, 700);
9}
10function textSlideOut(proj) {
11 $('ul.text').children('li:eq('+proj+')').animate({ right: "-270px" }, 700);
12}
13function photoFadeIn(proj) {
14 $('ul.photo').children('li:eq('+proj+')').fadeIn(700);
15}
16function photoFadeOut(proj) {
17 $('ul.photo').children('li:eq('+proj+')').fadeOut(700);
18}
19function photoPutBehind(proj) {
20 $('ul.photo').children('li:eq('+proj+')').css('z-index', 0);
21}
22function nextSlide() {
23 $('ul.photo').children('li:eq('+proj+')').css("z-index", 2);
24 setTimeout('photoFadeOut('+proj+')', 1000);
25 setTimeout('photoPutBehind('+proj+')', 1500);
26 textSlideOut(proj);
27 proj++;
28 var i = $('ul.text li').size() - 1;
29 if (proj>i) proj = 0;
30 setTimeout('photoFadeIn('+proj+')', 1000);
31 setTimeout('textSlideIn('+proj+')', 1500);
32}
33
34$(function() {
35 if (autoSlide) interval = setInterval('nextSlide()', autoSlideSecs*1000);
36 jQuery('.next').click(function() {
37 clearInterval(interval);
38 nextSlide();
39 if (autoSlide) interval = setInterval('nextSlide()', autoSlideSecs*1000);
40 return false;
41 });
42 $('#wpcumuluscontent embed').attr('width', '242');
43});
44
Note: See TracBrowser for help on using the repository browser.