|
|
Line 1: |
Line 1: |
| + | {{OUC-China.CommonCSS}} |
| <html> | | <html> |
| + | <script> |
| + | $(".firstHeading").text("Photos"); |
| + | </script> |
| + | <style type="text/css"> |
| + | .firstHeading {background:#FEEB4C;} |
| + | #gTop { |
| + | background:#FEEB4C url(https://static.igem.org/mediawiki/2011/8/8e/OUC-China.team.banner.png) top center no-repeat; |
| + | } |
| + | #content { background:#fff49c; border:10px solid #FEEB4C;} |
| + | |
| + | #content a { color:#002BB8;} |
| + | </style> |
| <style> | | <style> |
| #featuredslideshow { width: 640px; height: 360px; overflow: hidden; margin:0 auto; } | | #featuredslideshow { width: 640px; height: 360px; overflow: hidden; margin:0 auto; } |
Line 107: |
Line 120: |
| <li><a href="#"><img width="640" height="300" alt=".We love OUC" src="https://static.igem.org/mediawiki/2011/b/b5/OUC-China.We_love_OUC.jpg" /></a></li> | | <li><a href="#"><img width="640" height="300" alt=".We love OUC" src="https://static.igem.org/mediawiki/2011/b/b5/OUC-China.We_love_OUC.jpg" /></a></li> |
| <li><a href="#"><img width="640" height="300" alt="shaking hands with you" src="https://static.igem.org/mediawiki/2011/0/02/OUC-China.shaking_hands_with_you.jpg" /></a></li> | | <li><a href="#"><img width="640" height="300" alt="shaking hands with you" src="https://static.igem.org/mediawiki/2011/0/02/OUC-China.shaking_hands_with_you.jpg" /></a></li> |
- | <li><a href="#"><img width="640" height="300" alt="plastic glove and kinds of primers" src="https://static.igem.org/mediawiki/2011/1/17/OUC-China.plastic_glove_and_kinds_of_primers.jpg" /></a></li> | + | <li><a href="#"><img width |
- | <li><a href="#"><img width="640" height="300" alt="fungal_material" src="https://static.igem.org/mediawiki/2011/c/ca/OUC-China.fungal_material.jpg" /></a></li>
| + | |
- | <li><a href="#"><img width="640" height="300" alt="the_Five_Movements" src="https://static.igem.org/mediawiki/2011/e/ed/OUC-Chian.the_Five_Movements.jpg" /></a></li>
| + | |
- | <li><a href="#"><img width="640" height="300" alt="Jun_Zhang" src="https://static.igem.org/mediawiki/2011/3/31/OUC-China-Jun_Zhang.jpg" /></a></li>
| + | |
- | <li><a href="#"><img width="640" height="300" alt="Yang_Liu" src="https://static.igem.org/mediawiki/2011/b/bc/OUC-China.Yang_Liu.jpg" /></a></li>
| + | |
- | <li><a href="#"><img width="640" height="300" alt="Microbial_culture_dish" src="https://static.igem.org/mediawiki/2011/0/0f/OUC-China.Microbial_culture_dish.jpg" /></a></li>
| + | |
- | <li><a href="#"><img width="640" height="300" alt="analysing" src="https://static.igem.org/mediawiki/2011/6/6e/OUC-
| + | |
- | China.analysing.jpg" /></a></li>
| + | |
- | <li><a href="#"><img width="640" height="300" alt="_experiments" src="https://static.igem.org/mediawiki/2011/2/2c/OUC-China._experiments.jpg" /></a></li>
| + | |
- | <li><a href="#"><img width="640" height="300" alt="Doing_experiments" src="https://static.igem.org/mediawiki/2011/4/45/OUC-China.Doing_experiments..jpg" /></a></li>
| + | |
- | <li><a href="#"><img width="640" height="300" alt="discussing" src="https://static.igem.org/mediawiki/2011/0/09/OUC-China.discussing.jpg" /></a></li>
| + | |
- | <li><a href="#"><img width="640" height="300" alt="our_lab" src="https://static.igem.org/mediawiki/2011/8/8c/OUC-China.our_lab.jpg" /></a></li>
| + | |
- | <li><a href="#"><img width="640" height="300" alt="not me" src="https://static.igem.org/mediawiki/2011/5/53/OUC-China.no_it%27s_me%21.jpg" /></a></li>
| + | |
- | <li><a href="#"><img width="640" height="300" alt="look_at_this_serious_one" src="https://static.igem.org/mediawiki/2011/8/83/OUC-China.look_at_this_serious_one.jpg" /></a></li>
| + | |
- | <li><a href="#"><img width="640" height="300" alt="it_is_a_meeting" src="https://static.igem.org/mediawiki/2011/b/bc/OUC-China.it_is_a_meeting~.jpg" /></a></li>
| + | |
- | <li><a href="#"><img width="640" height="300" alt="I_forgot_it%27s_name_" src="https://static.igem.org/mediawiki/2011/2/2d/OUC-China.I_forgot_it%27s_name_..jpg" /></a></li>
| + | |
- | <li><a href="#"><img width="640" height="300" alt="Biological_experimental_equipment" src="https://static.igem.org/mediawiki/2011/b/bb/OUC-china.Biological_experimental_equipment.jpg" /></a></li>
| + | |
- | <li><a href="#"><img width="640" height="300" alt="WEI_AND_XIAOYAN" src="https://static.igem.org/mediawiki/2011/e/ed/OUC-China..WEI_AND_XIAOYAN.jpg" /></a></li>
| + | |
- | <li><a href="#"><img width="640" height="300" alt="Jiajun_Wu" src="https://static.igem.org/mediawiki/2011/0/0b/OUC-China..Jiajun_Wu.jpg" /></a></li>
| + | |
- | <li><a href="#"><img width="640" height="300" alt="results of the analysis"
| + | |
- | src="https://static.igem.org/mediawiki/2011/5/55/OUC-China.results_of_the_analysis.jpg" /></a></li>
| + | |
- | <li><a href="#"><img width="640" height="300" alt="equipments connected with the computer"
| + | |
- | src="https://static.igem.org/mediawiki/2011/9/95/OUC-China.equipments_connected_with_the_computer.jpg" /></a></li>
| + | |
- | <li><a href="#"><img width="640" height="300" alt="This experimental equipment requires to be booked online before using"
| + | |
- | src="https://static.igem.org/mediawiki/2011/8/85/OUC-China.This_experimental_Equipment_required_to_be_booked_online_before..jpg" /></a></li>
| + | |
- | <li><a href="#"><img width="640" height="300" alt="This one should be turned 90 degrees"
| + | |
- | src="https://static.igem.org/mediawiki/2011/8/82/OUC-China.This_one_should_be_turned_90_degrees..jpg" /></a></li>
| + | |
- | <li><a href="#"><img width="640" height="300" alt="another-equipment" src="https://static.igem.org/mediawiki/2011/0/02/OUC-China._another_equipment.jpg" /></a></li>
| + | |
- | <li><a href="#"><img width="640" height="300" alt=a-glance"
| + | |
- | src="https://static.igem.org/mediawiki/2011/3/3a/OUC-China.a_glance.jpg" /></a></li>
| + | |
- | <li><a href="#"><img width="640" height="300" alt=explaining" src="https://static.igem.org/mediawiki/2011/7/78/OUC-china.explaining.jpg" /></a></li>
| + | |
- | <li><a href="#"><img width="640" height="300" alt=keep-the-reagents-safely"
| + | |
- | src="https://static.igem.org/mediawiki/2011/4/4d/OUC-china.keep_the_reagents_safely.jpg" /></a></li>
| + | |
- | <li><a href="#"><img width="640" height="300" alt=lovely-apparatus" src="https://static.igem.org/mediawiki/2011/3/35/OUC-China.lovely_apparatus.jpg" /></a></li>
| + | |
- | <li><a href="#"><img width="640" height="300" alt=working-hard" src="https://static.igem.org/mediawiki/2011/0/02/OUC-China.working_hard.jpg" /></a></li>
| + | |
- | <li><a href="#"><img width="640" height="300" alt=some-small-items" src="https://static.igem.org/mediawiki/2011/b/b8/OUC-China.some_small_items.jpg" /></a></li>
| + | |
- | <li><a href="#"><img width="640" height="300" alt=test-tubes-in-line" src="https://static.igem.org/mediawiki/2011/4/4e/OUC-China.test_tubes_in_line.jpg" /></a></li>
| + | |
- | <li><a href="#"><img width="640" height="300" alt=Yang-liu-in-work" src="https://static.igem.org/mediawiki/2011/e/e8/OUC-China.Yang_liu_in_work.jpg" /></a></li>
| + | |
- | <li><a href="#"><img width="640" height="300" alt=Yi-Xing src="https://static.igem.org/mediawiki/2011/e/eb/OUC-China.Yi_Xing.jpg" /></a></li>
| + | |
- | <!-- eccetera -->
| + | |
- | </ul>
| + | |
- | </div>
| + | |
- | <script type="text/javascript">
| + | |
- | /*!
| + | |
- | * slideViewerPro 1.0
| + | |
- | * Examples and documentation at:
| + | |
- | * http://www.gcmingati.net/wordpress/wp-content/lab/jquery/svwt/
| + | |
- | * 2009 Gian Carlo Mingati
| + | |
- | * Version: 1.0.4 (12-AUGUST-2009)
| + | |
- | * Dual licensed under the MIT and GPL licenses:
| + | |
- | * http://www.opensource.org/licenses/mit-license.php
| + | |
- | * http://www.gnu.org/licenses/gpl.html
| + | |
- | * Requires:
| + | |
- | * jQuery v1.3.2 or later
| + | |
- | * Option:
| + | |
- | * jQuery Timers plugin | plugins.jquery.com/project/timers (for autoslide mode)
| + | |
- | *
| + | |
- | */
| + | |
- | jQuery.extend( jQuery.easing, // from the jquery.easing plugin
| + | |
- | {
| + | |
- | easeInOutExpo: function (x, t, b, c, d) {
| + | |
- | if (t==0) return b;
| + | |
- | if (t==d) return b+c;
| + | |
- | if ((t/=d/2) < 1) return c/2 * Math.pow(2, 10 * (t - 1)) + b;
| + | |
- | return c/2 * (-Math.pow(2, -10 * --t) + 2) + b;
| + | |
- | }
| + | |
- | });
| + | |
- | jQuery(function(){
| + | |
- | jQuery("div.svwp").prepend("<img src='images/svwloader.gif' class='ldrgif' alt='loading...'/ >"); //change with YOUR loader image path
| + | |
- | });
| + | |
- | var j = 0;
| + | |
- | jQuery.fn.slideViewerPro = function(settings) {
| + | |
- | settings = jQuery.extend({
| + | |
- | galBorderWidth: 6,
| + | |
- | thumbsTopMargin: 3,
| + | |
- | thumbsRightMargin: 3,
| + | |
- | thumbsBorderWidth: 3,
| + | |
- | buttonsWidth: 20,
| + | |
- | galBorderColor: "#ff0000",
| + | |
- | thumbsBorderColor: "#d8d8d8",
| + | |
- | thumbsActiveBorderColor: "#ff0000",
| + | |
- | buttonsTextColor: "#ff0000",
| + | |
- | thumbsBorderOpacity: 1.0, // could be 0, 0.1 up to 1.0
| + | |
- | thumbsActiveBorderOpacity: 1.0, // could be 0, 0.1 up to 1.0
| + | |
- | easeTime: 750,
| + | |
- | asTimer: 4000,
| + | |
- | thumbs: 5,
| + | |
- | thumbsPercentReduction: 12,
| + | |
- | thumbsVis: true,
| + | |
- | easeFunc: "easeInOutExpo",
| + | |
- | leftButtonInner: "-", //could be an image "<img src='images/larw.gif' />" or an escaped char as "&larr";
| + | |
- | rightButtonInner: "+", //could be an image or an escaped char as "&rarr";
| + | |
- | autoslide: false,
| + | |
- | typo: false,
| + | |
- | typoFullOpacity: 0.9,
| + | |
- | shuffle: false
| + | |
- | }, settings);
| + | |
- |
| + | |
- | return this.each(function(){
| + | |
- | function shuffle(a) {
| + | |
- | var i = a.size();
| + | |
- | while (--i) {
| + | |
- | var j = Math.floor(Math.random() * (i));
| + | |
- | var tmp = a.slice(i, i+1);
| + | |
- | a.slice(j, j+1).insertAfter(tmp);
| + | |
- | }
| + | |
- | }
| + | |
- | var container = jQuery(this);
| + | |
- | (!settings.shuffle) ? null : shuffle(container.find("li"));
| + | |
- | container.find("img.ldrgif").remove();
| + | |
- | container.removeClass("svwp").addClass("slideViewer");
| + | |
- | container.attr("id", "svwp"+j);
| + | |
- | var pictWidth = container.find("img").attr("width");
| + | |
- | var pictHeight = container.find("img").attr("height");
| + | |
- | var pictEls = container.find("li").size();
| + | |
- | (pictEls >= settings.thumbs) ? null : settings.thumbs = pictEls;
| + | |
- | var slideViewerWidth = pictWidth*pictEls;
| + | |
- | var thumbsWidth = Math.round(pictWidth*settings.thumbsPercentReduction/100);
| + | |
- | var thumbsHeight = Math.round(pictHeight*settings.thumbsPercentReduction/100);
| + | |
- | var pos = 0;
| + | |
- | var r_enabled = true;
| + | |
- | var l_enabled = true;
| + | |
- | container.find("ul").css("width" , slideViewerWidth)
| + | |
- | .wrap(jQuery("<div style='width:"+ pictWidth +"px; overflow: hidden; position: relative; top: 0; left: 0'>"));
| + | |
- | container.css("width" , pictWidth);
| + | |
- | container.css("height" , pictHeight);
| + | |
- | container.each(function(i) {
| + | |
- | if(settings.typo)
| + | |
- | {
| + | |
- | jQuery(this).find("img").each(function(z) {
| + | |
- | jQuery(this).after("<span class='typo' style='position: absolute; width:"+(pictWidth-12)+"px; margin: 0 0 0 -"+pictWidth+"px'>"+jQuery(this).attr("alt")+"<\/span>");
| + | |
- | });
| + | |
- | }
| + | |
- | jQuery(this).after("<div class='thumbSlider' id='thumbSlider" + j + "'><ul><\/ul><\/div>");
| + | |
- | jQuery(this).next().after("<a href='#' class='left' id='left" + j + "'><span>"+settings.leftButtonInner+"</span><\/a><a href='#' class='right' id='right" + j + "'><span>"+settings.rightButtonInner+"<\/span><\/a>");
| + | |
- |
| + | |
- | jQuery(this).find("li").each(function(n) {
| + | |
- | jQuery("div#thumbSlider" + j + " ul").append("<li><a title='" + jQuery(this).find("img").attr("alt") + "' href='#'><img width='"+ thumbsWidth +"' height='"+ thumbsHeight +"' src='" + jQuery(this).find("img").attr("src") + "' /><p class='tmbrdr'> <\/p><\/a><\/li>");
| + | |
- | });
| + | |
- |
| + | |
- | jQuery("div#thumbSlider" + j + " a").each(function(z) {
| + | |
- | jQuery(this).bind("click", function(){
| + | |
- | jQuery(this).find("p.tmbrdr").css({borderColor: settings.thumbsActiveBorderColor, opacity: settings.thumbsActiveBorderOpacity});
| + | |
- | jQuery(this).parent().parent().find("p.tmbrdr").not(jQuery(this).find("p.tmbrdr")).css({borderColor: settings.thumbsBorderColor, opacity: settings.thumbsBorderOpacity});
| + | |
- | var cnt = -(pictWidth*z);
| + | |
- | (cnt != container.find("ul").css("left").replace(/px/, "")) ? container.find("span.typo").animate({"opacity": 0}, 250) : null ;
| + | |
- | container.find("ul").animate({ left: cnt}, settings.easeTime, settings.easeFunc, function(){container.find("span.typo").animate({"opacity": settings.typoFullOpacity}, 250)});
| + | |
- | return false;
| + | |
- | });
| + | |
- | });
| + | |
- | // shortcuts to +/- buttons
| + | |
- | var jQuerybtl = jQuery("a#left" + j);
| + | |
- | var jQuerybtr = jQuery("a#right" + j);
| + | |
- |
| + | |
- | // right/left
| + | |
- | jQuerybtr.bind("click", function(){
| + | |
- | if (r_enabled) (pictEls-pos > settings.thumbs*2 || pictEls%settings.thumbs == 0)? pos += settings.thumbs : pos += pictEls % settings.thumbs;
| + | |
- | r_enabled = false;
| + | |
- | jQuery(this).prev().prev().find("ul:not(:animated)").animate({ left: -(thumbsWidth+settings.thumbsRightMargin)*pos}, 500, settings.easeFunc, function(){authorityMixing();});
| + | |
- | return false;
| + | |
- | });
| + | |
- | jQuerybtl.bind("click", function(){
| + | |
- | if (l_enabled){ if(pos!=0) {(pictEls-pos > settings.thumbs || pictEls%settings.thumbs == 0)? pos -= settings.thumbs : pos -= pictEls % settings.thumbs;
| + | |
- | }
| + | |
- | }
| + | |
- | l_enabled = false;
| + | |
- | jQuery(this).prev().find("ul:not(:animated)").animate({ left: -(thumbsWidth+settings.thumbsRightMargin)*pos}, 500, settings.easeFunc, function(){authorityMixing();});
| + | |
- | return false;
| + | |
- | });
| + | |
- |
| + | |
- | function authorityMixing()
| + | |
- | {
| + | |
- |
| + | |
- | //right btt
| + | |
- | (pos == pictEls-settings.thumbs) ? jQuerybtr.addClass("r_dis") : jQuerybtr.removeClass("r_dis");
| + | |
- | (pos == pictEls-settings.thumbs) ? r_enabled = false : r_enabled = true;
| + | |
- | //left btt
| + | |
- | (pos == 0) ? jQuerybtl.addClass("l_dis") : jQuerybtl.removeClass("l_dis");
| + | |
- | (pos == 0) ? l_enabled = false : l_enabled = true;
| + | |
- | }
| + | |
- |
| + | |
- | //CSS defs @ runtime
| + | |
- | var tBorder = settings.thumbsBorderWidth;
| + | |
- | var contBorder = settings.galBorderWidth
| + | |
- |
| + | |
- | jQuery(".slideViewer a img").css({border: "0"});
| + | |
- | if(settings.typo)
| + | |
- | {
| + | |
- | jQuery(this).find("span.typo").each(function(z) {
| + | |
- | jQuery(this).css({marginTop: (pictHeight-jQuery(this).innerHeight()), opacity: settings.typoFullOpacity});
| + | |
- | });
| + | |
- | }
| + | |
- | jQuery("div#svwp"+ j).css({border: settings.galBorderWidth +"px solid "+settings.galBorderColor});
| + | |
- |
| + | |
- | jQuery("div#thumbSlider" + j).css({position: "relative", left: contBorder, top: settings.thumbsTopMargin+"px", width: settings.thumbs*thumbsWidth+((settings.thumbsRightMargin*settings.thumbs)-settings.thumbsRightMargin), height: thumbsHeight, textAlign: "center", overflow: "hidden", margin: "0 auto"});
| + | |
- | jQuery("div#thumbSlider" + j + " ul").css({width: (thumbsWidth*pictEls)+settings.thumbsRightMargin*pictEls, position: "relative", left: "0", top: "0"});
| + | |
- | jQuery("div#thumbSlider" + j + " ul li").css({marginRight: settings.thumbsRightMargin});
| + | |
- |
| + | |
- | jQuery("div#thumbSlider" + j).find("p.tmbrdr").css({width: (thumbsWidth-tBorder*2)+"px", height: (thumbsHeight-tBorder*2) +"px", top: -(thumbsHeight) +"px", border: settings.thumbsBorderWidth +"px solid "+settings.thumbsBorderColor, opacity: settings.thumbsBorderOpacity});
| + | |
- | jQuery("div#thumbSlider" + j + " a:first p.tmbrdr").css({borderColor: settings.thumbsActiveBorderColor, opacity: settings.thumbsActiveBorderOpacity});
| + | |
- |
| + | |
- | var rbttLeftMargin = (pictWidth/2) + (jQuery("div#thumbSlider" + j).width()/2) + settings.thumbsRightMargin + contBorder;
| + | |
- | var lbttLeftMargin = (pictWidth/2) - (jQuery("div#thumbSlider" + j).width()/2) - (settings.buttonsWidth + settings.thumbsRightMargin) + contBorder;
| + | |
- | var innerImgH = jQuery("a#right" + j + " span img").attr("height");
| + | |
- |
| + | |
- | jQuery("a#left" + j).css({display: "block", textAlign: "center", width: settings.buttonsWidth + "px" , height: thumbsHeight+"px", margin: -(thumbsHeight-settings.thumbsTopMargin) +"px 0 0 "+lbttLeftMargin+"px", textDecoration: "none", lineHeight: thumbsHeight+"px", color: settings.buttonsTextColor});
| + | |
- | jQuery("a#right" + j).css({display: "block", textAlign: "center", width: settings.buttonsWidth + "px", height: thumbsHeight+"px" , margin: -(thumbsHeight) +"px 0 0 "+rbttLeftMargin+"px", textDecoration: "none", lineHeight: thumbsHeight+"px", color: settings.buttonsTextColor});
| + | |
- | jQuery("a#left" + j + " span img").css({margin: Math.round((thumbsHeight/2)-(innerImgH/2))+"px 0 0 0"});
| + | |
- | jQuery("a#right" + j + " span img").css({margin: Math.round((thumbsHeight/2)-(innerImgH/2))+"px 0 0 0"});
| + | |
- |
| + | |
- | authorityMixing();
| + | |
- |
| + | |
- | if(settings.autoslide){
| + | |
- |
| + | |
- | var i = 1;
| + | |
- |
| + | |
- | jQuery("div#thumbSlider" + j).everyTime(settings.asTimer, "asld", function() {
| + | |
- | jQuery(this).find("a").eq(i).trigger("click");
| + | |
- | if(i == 0)
| + | |
- | {
| + | |
- | pos = 0;
| + | |
- | l_enabled = false;
| + | |
- | jQuery("div#thumbSlider" + j).find("ul:not(:animated)").animate({ left: -(thumbsWidth+settings.thumbsRightMargin)*pos}, 500, settings.easeFunc, function(){authorityMixing();});
| + | |
- | }
| + | |
- | else l_enabled = true;
| + | |
- |
| + | |
- | (i%settings.thumbs == 0)? jQuery(this).next().next().trigger("click") : null;
| + | |
- | (i < pictEls-1)? i++ : i=0;
| + | |
- | });
| + | |
- |
| + | |
- | //stops autoslidemode
| + | |
- | jQuery("a#right" + j).bind("mouseup", function(){
| + | |
- | jQuery(this).prev().prev().stopTime("asld");
| + | |
- | });
| + | |
- | jQuery("a#left" + j).bind("mouseup", function(){
| + | |
- | jQuery(this).prev().stopTime("asld");
| + | |
- | });
| + | |
- | jQuery("div#thumbSlider" + j + " a").bind("mouseup", function(){
| + | |
- | jQuery(this).parent().parent().parent().stopTime("asld");
| + | |
- | });
| + | |
- | }
| + | |
- | var uiDisplay = (settings.thumbsVis)? "block":"none";
| + | |
- | jQuery("div#thumbSlider" + j + ", a#left" + j + ", a#right" + j).wrapAll("<div style='width:"+ pictWidth +"px; display: "+uiDisplay+"' id='ui"+j+"'><\/div>");
| + | |
- | jQuery("div#svwp"+ j + ", div#ui" + j).wrapAll("<div style='width:"+ pictWidth +"px'><\/div>");
| + | |
- | });
| + | |
- | (jQuery("div#thumbSlider" + j).width()+(settings.buttonsWidth*2) >= pictWidth)? alert("ALERT: THE THUMBNAILS SLIDER IS TOO WIDE! \nthumbsPercentReduction and/or buttonsWidth needs to be scaled down!") : null;
| + | |
- | j++;
| + | |
- | });
| + | |
- | };
| + | |
- | jQuery.fn.extend({
| + | |
- | everyTime: function(interval, label, fn, times, belay) {
| + | |
- | return this.each(function() {
| + | |
- | jQuery.timer.add(this, interval, label, fn, times, belay);
| + | |
- | });
| + | |
- | },
| + | |
- | oneTime: function(interval, label, fn) {
| + | |
- | return this.each(function() {
| + | |
- | jQuery.timer.add(this, interval, label, fn, 1);
| + | |
- | });
| + | |
- | },
| + | |
- | stopTime: function(label, fn) {
| + | |
- | return this.each(function() {
| + | |
- | jQuery.timer.remove(this, label, fn);
| + | |
- | });
| + | |
- | }
| + | |
- | });
| + | |
- |
| + | |
- | jQuery.extend({
| + | |
- | timer: {
| + | |
- | guid: 1,
| + | |
- | global: {},
| + | |
- | regex: /^([0-9]+)\s*(.*s)?$/,
| + | |
- | powers: {
| + | |
- | // Yeah this is major overkill...
| + | |
- | 'ms': 1,
| + | |
- | 'cs': 10,
| + | |
- | 'ds': 100,
| + | |
- | 's': 1000,
| + | |
- | 'das': 10000,
| + | |
- | 'hs': 100000,
| + | |
- | 'ks': 1000000
| + | |
- | },
| + | |
- | timeParse: function(value) {
| + | |
- | if (value == undefined || value == null)
| + | |
- | return null;
| + | |
- | var result = this.regex.exec(jQuery.trim(value.toString()));
| + | |
- | if (result[2]) {
| + | |
- | var num = parseInt(result[1], 10);
| + | |
- | var mult = this.powers[result[2]] || 1;
| + | |
- | return num * mult;
| + | |
- | } else {
| + | |
- | return value;
| + | |
- | }
| + | |
- | },
| + | |
- | add: function(element, interval, label, fn, times, belay) {
| + | |
- | var counter = 0;
| + | |
- |
| + | |
- | if (jQuery.isFunction(label)) {
| + | |
- | if (!times)
| + | |
- | times = fn;
| + | |
- | fn = label;
| + | |
- | label = interval;
| + | |
- | }
| + | |
- |
| + | |
- | interval = jQuery.timer.timeParse(interval);
| + | |
- |
| + | |
- | if (typeof interval != 'number' || isNaN(interval) || interval <= 0)
| + | |
- | return;
| + | |
- |
| + | |
- | if (times ){ if(times.constructor != Number) {
| + | |
- | belay = !!times;
| + | |
- | times = 0;
| + | |
- | }
| + | |
- | }
| + | |
- |
| + | |
- | times = times || 0;
| + | |
- | belay = belay || false;
| + | |
- |
| + | |
- | if (!element.$timers)
| + | |
- | element.$timers = {};
| + | |
- |
| + | |
- | if (!element.$timers[label])
| + | |
- | element.$timers[label] = {};
| + | |
- |
| + | |
- | fn.$timerID = fn.$timerID || this.guid++;
| + | |
- |
| + | |
- | var handler = function() {
| + | |
- | if (belay){ if(this.inProgress)
| + | |
- | return;
| + | |
- | }
| + | |
- | this.inProgress = true;
| + | |
- | if (++counter > times){ if(times !== 0){
| + | |
- | jQuery.timer.remove(element, label, fn);
| + | |
- | }
| + | |
- | }
| + | |
- | if(fn.call(element, counter) === false){
| + | |
- | jQuery.timer.remove(element, label, fn);
| + | |
- | }
| + | |
- |
| + | |
- | this.inProgress = false;
| + | |
- | };
| + | |
- |
| + | |
- | handler.$timerID = fn.$timerID;
| + | |
- |
| + | |
- | if (!element.$timers[label][fn.$timerID])
| + | |
- | element.$timers[label][fn.$timerID] = window.setInterval(handler,interval);
| + | |
- |
| + | |
- | if ( !this.global[label] )
| + | |
- | this.global[label] = [];
| + | |
- | this.global[label].push( element );
| + | |
- |
| + | |
- | },
| + | |
- | remove: function(element, label, fn) {
| + | |
- | var timers = element.$timers, ret;
| + | |
- |
| + | |
- | if ( timers ) {
| + | |
- |
| + | |
- | if (!label) {
| + | |
- | for ( label in timers )
| + | |
- | this.remove(element, label, fn);
| + | |
- | } else if ( timers[label] ) {
| + | |
- | if ( fn ) {
| + | |
- | if ( fn.$timerID ) {
| + | |
- | window.clearInterval(timers[label][fn.$timerID]);
| + | |
- | delete timers[label][fn.$timerID];
| + | |
- | }
| + | |
- | } else {
| + | |
- | for ( var fn in timers[label] ) {
| + | |
- | window.clearInterval(timers[label][fn]);
| + | |
- | delete timers[label][fn];
| + | |
- | }
| + | |
- | }
| + | |
- |
| + | |
- | for ( ret in timers[label] ) break;
| + | |
- | if ( !ret ) {
| + | |
- | ret = null;
| + | |
- | delete timers[label];
| + | |
- | }
| + | |
- | }
| + | |
- |
| + | |
- | for ( ret in timers ) break;
| + | |
- | if ( !ret )
| + | |
- | element.$timers = null;
| + | |
- | }
| + | |
- | }
| + | |
- | }
| + | |
- | });
| + | |
- |
| + | |
- | if (jQuery.browser.msie)
| + | |
- | jQuery(window).one("unload", function() {
| + | |
- | var global = jQuery.timer.global;
| + | |
- | for ( var label in global ) {
| + | |
- | var els = global[label], i = els.length;
| + | |
- | while ( --i )
| + | |
- | jQuery.timer.remove(els[i], label);
| + | |
- | }
| + | |
- | });
| + | |
- |
| + | |
- |
| + | |
- |
| + | |
- |
| + | |
- | </script>
| + | |
- | <script type="text/javascript">
| + | |
- | $("div#featuredslideshow").slideViewerPro({
| + | |
- | thumbs: 4,
| + | |
- | thumbsPercentReduction: 15,
| + | |
- | galBorderWidth: 1,
| + | |
- | galBorderColor: "#CCCCCC",
| + | |
- | thumbsTopMargin: 10,
| + | |
- | thumbsRightMargin: 10,
| + | |
- | thumbsBorderWidth: 2,
| + | |
- | thumbsActiveBorderColor: "#993399",
| + | |
- | thumbsActiveBorderOpacity: 1,
| + | |
- | thumbsBorderOpacity: 1,
| + | |
- | buttonsTextColor: "#333333",
| + | |
- |
| + | |
- | autoslide: true,
| + | |
- | typo: true
| + | |
- | });
| + | |
- | </script>
| + | |
- | <!-- leftButtonInner: "<img src='images/larw.gif' alt='left' />",
| + | |
- | rightButtonInner: "<img src='images/rarw.gif' alt='right' />", -->
| + | |
- |
| + | |
- | </div>
| + | |
- | </div>
| + | |
- | </html>
| + | |