Team:Brown-Stanford/Templates/Main

From 2011.igem.org

(Difference between revisions)
Line 13: Line 13:
var slideshowSpeed = 6000;
var slideshowSpeed = 6000;
 +
// Variable to store the images we need to set as background
 +
// which also includes some text and url's.
var photos = [ {
var photos = [ {
-
"url" : "https://static.igem.org/mediawiki/2011/a/a1/Brown-Stanford_BG1.jpg",
+
"image" : "https://static.igem.org/mediawiki/2011/a/a1/Brown-Stanford_BG1.jpg",
}, {
}, {
-
"url" : "https://static.igem.org/mediawiki/2011/8/81/Brown-Stanford_BG2.jpg",
+
"image" : "https://static.igem.org/mediawiki/2011/8/81/Brown-Stanford_BG2.jpg",
}, {
}, {
-
"url" : "https://static.igem.org/mediawiki/2011/a/a9/Brown-Stanford_BG3.jpg",
+
"image" : "https://static.igem.org/mediawiki/2011/a/a9/Brown-Stanford_BG3.jpg",
}, {
}, {
-
"url" : "https://static.igem.org/mediawiki/2011/f/fd/Brown-Stanford_BG4.jpg",
+
"image" : "https://static.igem.org/mediawiki/2011/f/fd/Brown-Stanford_BG4.jpg",
}, {
}, {
-
"url" : "https://static.igem.org/mediawiki/2011/4/4c/Brown-Stanford_BG5.jpg",
+
"image" : "https://static.igem.org/mediawiki/2011/4/4c/Brown-Stanford_BG5.jpg",
}, {
}, {
-
"url" : "https://static.igem.org/mediawiki/2011/7/7f/Brown-Stanford_BG6.jpg",
+
"image" : "https://static.igem.org/mediawiki/2011/7/7f/Brown-Stanford_BG6.jpg",
}
}
];
];
Line 31: Line 33:
$(document).ready(function() {
$(document).ready(function() {
-
+
 
 +
var interval;
var activeContainer = 1;
var activeContainer = 1;
var currentImg = 0;
var currentImg = 0;
-
var animating = true;
+
var animating = false;
-
var navigate = function(currentImg) {
+
var navigate = function(direction) {
 +
// Check if no animation is running. If it is, prevent the action
if(animating) {
if(animating) {
return;
return;
}
}
 +
// Check which current image we need to show
 +
if(direction == "next") {
 +
currentImg++;
 +
if(currentImg == photos.length + 1) {
 +
currentImg = 1;
 +
}
 +
}
 +
       
// Check which container we need to use
// Check which container we need to use
var currentContainer = activeContainer;
var currentContainer = activeContainer;
Line 48: Line 60:
}
}
-
showImage(photos[currentImg], currentContainer, activeContainer);
+
showImage(photos[currentImg - 1], currentContainer, activeContainer);
};
};
Line 64: Line 76:
"display" : "block",
"display" : "block",
"z-index" : currentZindex
"z-index" : currentZindex
-
                        "background-repeat" : "no-repeat"
 
-
                        "background-attachment" : "fixed"
 
-
                        "background-position" : "center top"
 
});
});
-
 
-
 
// Fade out the current container
// Fade out the current container
Line 76: Line 83:
setTimeout(function() {
setTimeout(function() {
animating = false;
animating = false;
-
}, 500);
+
}, 2000);
});
});
 +
};
 +
 +
var stopAnimation = function() {
 +
// Change the background image to "play"
 +
$("#control").css({ "background-image" : "url(images/btn_play.png)" });
 +
 +
// Clear the interval
 +
clearInterval(interval);
};
};
Line 624: Line 639:
</head>
</head>
<body>
<body>
-
<div id="headerimg1" class="headerimg">yay?</div>
+
<div id="headerimg1" class="headerimg"></div>
<div id="headerimg2" class="headerimg"></div>
<div id="headerimg2" class="headerimg"></div>
-
<div id="header" style="height:100px;padding: 85px 55px 10px 55px"><!--<img align="center" style="margin-bottom:0px; padding:0;" src="https://static.igem.org/mediawiki/2010/d/d4/CamBillHeaderSq.png" usemap="#headermap" alt="E. glowli">-->
+
<div id="header" style="height:100px;padding: 85px 55px 10px 55px">
  <ul id="sdt_menu" class="sdt_menu">
  <ul id="sdt_menu" class="sdt_menu">
<li>
<li>
Line 698: Line 713:
</div>
</div>
</li>
</li>
-
<!-- <li>
 
-
<a href="/">
 
-
<img src="https://static.igem.org/mediawiki/2011/6/6f/Brown-Stanford_iGEM-Thumb.png" alt=""/>
 
-
<span class="sdt_active"></span>
 
-
<span class="sdt_wrap">
 
-
<span class="sdt_link">iGEM Home</span>
 
-
<span class="sdt_descr"></span>
 
-
</span>
 
-
</a>
 
-
</li>-->
 
</ul>
</ul>
-
<!--<map name="headermap">
+
</div>
-
              <area shape="rect" coords="10,30,250,240" href="https://2010.igem.org/Team:Brown-Stanford" />
+
-
              <area shape="rect" coords="888,177,942,201" href="http://www.flickr.com/people/roberts87/" />
+
-
        </map>--></div>
+
-
<!--
+
-
<li><a class="head" href="/Team:Brown-Stanford/Notebook/Week1">Notebook</a>
+
-
<ul class="llmenu llmenuyellow">
+
-
<li><a href="/Team:Brown-Stanford/Protocols">Protocols</a> </li>
+
-
</ul>
+
-
</li>
+
-
-->
+
-
 
+
-
 
+
-
 
+
-
 
+
-
<!--<li><a href="/Team:Brown-Stanford/Partners" class="head">Our Partners</a>
+
-
<ul class="llmenu llmenublue">
+
-
<li><a href="/Team:Brown-Stanford/Partners">Sponsors</a> </li>
+
-
<li><a href="/Team:Brown-Stanford/iGEM_Teams">iGEM Teams</a> </li>
+
-
<li><a href="/Team:Brown-Stanford/Departments">University</a> </li>
+
-
<li><a href="/Team:Brown-Stanford/Publicity">Publicity</a> </li>
+
-
 
+
-
</ul> </li>-->
+
-
 
+
<div class="content">
<div class="content">

Revision as of 23:21, 9 June 2011