1/* 2 -------------------------------------------------------------- 3 Custom Javascript - Project: Agora Template 4 Description: Html / Css / jQuery template 5 Author: pezflash - http://www.themeforest.net/user/pezflash 6 Version: 1.5 7 -------------------------------------------------------------- 8*/ 9 10 11 12////////////////////////////////////////////////////////////////// 13//DOCUMENT READY 14$(document).ready(function() { 15 16 //CUSTOM CONFIGURATION (SETUP: true/false) 17 var autoSlideOnInit = true; 18 var preloadBackgrounds = false; 19 var slideshowDelay = 5000; 20 21 22 23 ////////////////////////////////////////////////////////////////// 24 //STORING ELEMENTS - VARS 25 //DON'T EDIT BELOW THIS LINE UNLESS YOU KNOW WHAT YOU ARE DOING 26 var slideshow = $('#slideshow'); 27 var tl = $('#home .thumbs ul li'); 28 var ta = $('#home .thumbs ul li a'); 29 var ti = $('#home .thumbs ul li img'); 30 31 32 33 ////////////////////////////////////////////////////////////////// 34 //VEGAS PLUGIN (FULLSCREEN GALLERY) CONFIGURATION 35 var slideshowRunning = false; 36 var backgroundList = []; 37 38 ta.each( function() { 39 backgroundList.push( { 40 src: $(this).attr('href'), 41 valign: $(this).data('valign'), 42 align: $(this).data('align'), 43 fade: 2000 44 } ); 45 } ); 46 47 $.vegas(backgroundList[0])('overlay')('pause'); 48 49 slideshow.click(function() { 50 51 //START SLIDESHOW 52 if (slideshowRunning == false) { 53 slideshowRunning = true; 54 55 slideshow.attr('src', 'images/home/pause.png'); 56 slideshow.attr('title', 'Stop slideshow'); 57 58 $.vegas('slideshow', { 59 delay: slideshowDelay, 60 backgrounds: backgroundList 61 }) 62 63 //STOP SLIDESHOW 64 } else { 65 slideshowRunning = false; 66 67 slideshow.attr('src', 'images/home/play.png'); 68 slideshow.attr('title', 'Play slideshow'); 69 70 $.vegas('pause'); 71 } 72 return false; 73 }); 74 75 ta.click(function() { 76 77 slideshowRunning = false; 78 79 slideshow.attr('src', 'images/home/play.png'); 80 slideshow.attr('title', 'Play slideshow'); 81 82 var idx = $(this).parent('li').index(); 83 $.vegas('stop')(backgroundList[idx]); 84 85 return false; 86 }); 87 88 //PRELOAD 89 if (preloadBackgrounds == true) $.vegas('preload', backgroundList); 90 91 //AUTOSLIDESHOW ON INIT 92 if (autoSlideOnInit == true) { 93 slideshowRunning = true; 94 slideshow.attr('src', 'images/home/pause.png'); 95 slideshow.attr('title', 'Stop slideshow'); 96 97 $.vegas('slideshow', { 98 delay: slideshowDelay, 99 backgrounds: backgroundList 100 }) 101 }; 102 103 104 //BACKG COLOR ON ACTIVE THUMB - MOUSEOVER / MOUSEOUT 105 $('body').bind('vegasload', function(e, bg) { 106 var src = $(bg).attr('src').replace('background', 'thumbnail'); 107 ti.css('opacity', '1'); 108 $('img[src="' + src + '"]').css('opacity', '0'); 109 }); 110 111 var currentThumb = $('#home .thumbs a:first img')[0]; 112 113 ti.click(function() { 114 currentThumb = this; 115 }); 116 117 ti.mouseover(function() { 118 $(this).css('opacity', '0'); 119 }); 120 121 ti.mouseout(function() { 122 if (this != currentThumb) { 123 $(this).css('opacity', '1'); 124 } 125 }); 126 127 //TIPSY TOOLTIP 128 slideshow.tipsy({ gravity: 'w', fade: true, offset: 5 }); 129 130}); 131 132 133 134
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.