|
|
(38 intermediate revisions not shown) |
Line 1: |
Line 1: |
- | <html lang="en"> | + | <html> |
- | <head>
| + | <head> |
- | <title>iGem Buenos Aires</title>
| + | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> |
- | <meta charset=utf-8>
| + | <title> Project: Luxilla - Pontificia Universidad Católica de Chile, iGEM 2012</title> |
- | <meta name="description" content="iGem Buenos Aires" />
| + | |
- | <meta name="keywords" content="biosensing, igem, buenos aires, UBA, arsenic"/>
| + | |
- | <link rel="stylesheet" type="text/css" rel="stylesheet" href="https://2013.igem.org/Team:Buenos_Aires/css/style_color.css?action=raw&ctype=text/css" /> | + | <link rel="stylesheet" type="text/css" href="https://2013.igem.org/Team:Buenos_Aires/css/templatecss?action=raw&ctype=text/css" /> |
| + | |
| + | |
| + | <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script> |
| + | <script src="https://2012.igem.org/Team:UC_Chile/Templates/droplinemenu?action=raw&ctype=text/javascript" type="text/javascript"></script> |
| + | <script type="text/javascript" src="https://2012.igem.org/Team:UC_Chile/Templates/nivosliderpack?action=raw&ctype=text/javascript"></script> |
| + | <script type="text/javascript" src="https://2012.igem.org/Team:UC_Chile/Templates/hoverintent?action=raw&ctype=text/javascript"></script> |
| + | <script type="text/javascript" src="https://2012.igem.org/Team:UC_Chile/Templates/galleriffic?action=raw&ctype=text/javascript"></script> |
| + | <script type="text/javascript" src="https://2012.igem.org/Team:UC_Chile/Templates/js/opacityrollover?action=raw&ctype=text/javascript"></script> |
| + | <script type="text/javascript" src="https://2012.igem.org/Team:UC_Chile/Templates/js/jqueryhistory?action=raw&ctype=text/javascript"></script> |
| + | <script type="text/javascript" src="https://2011.igem.org/Team:Johns_Hopkins/Templates/js/profile?action=raw&ctype=text/javascript"></script> |
| + | <script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script> |
| + | <script type="text/javascript" src="https://2012.igem.org/Team:UC_Chile/Templates/js/nivoslider?action=raw&ctype=text/js"></script> |
| + | <script type="text/javascript" src="https://2011.igem.org/Team:Imperial_College_London/superfishjs?action=raw&ctype=text/js"></script> |
| + | <script type="text/javascript" src="https://2011.igem.org/Team:Imperial_College_London/magnifier?action=raw&ctype=text/js"> |
| + | <script type="text/javascript" src="https://2012.igem.org/Team:UC_Chile/Templates/js/nivoslider?action=raw&ctype=text/js"></script> |
| + | <script type="text/javascript"> |
| + | |
| + | /*********************************************** |
| + | * jQuery Image Magnify- (c) Dynamic Drive DHTML code library (www.dynamicdrive.com) |
| + | * This notice MUST stay intact for legal use |
| + | * Visit Dynamic Drive at http://www.dynamicdrive.com/ for this script and 100s more |
| + | ***********************************************/ |
| + | |
| + | var $ = jQuery; |
| + | jQuery.imageMagnify.zIndexcounter = 1000; |
| + | </script> |
| + | |
| + | <script> |
| + | $(document).ready(function() { |
| + | $("sup").click(function () { |
| + | if ($(this).html().substr(0,1)=="[") |
| + | { |
| + | if ($('.technology').length>0) |
| + | { |
| + | ddaccordion.expandone('technology', $('.technology').length-1) |
| + | setTimeout("window.scrollBy(0,50000)",200) |
| + | } |
| + | else window.scrollBy(0,50000) |
| + | } |
| + | }); |
| + | $("sup").mouseover(function () { |
| + | if ($(this).html().substr(0,1)=="[") $(this).css('cursor', 'pointer'); |
| + | }); |
| + | }); |
| + | </script> |
| + | |
| + | <script> |
| + | |
| + | $(document).ready(function() { |
| + | $('ul.sf-menu').superfish({ |
| + | }); |
| + | }); |
| + | |
| + | </script> |
| | | |
| <link href="http://fonts.googleapis.com/css?family=PT+Sans+Narrow:regular,bold" rel="stylesheet" type="text/css" /> <!-- Font --> | | <link href="http://fonts.googleapis.com/css?family=PT+Sans+Narrow:regular,bold" rel="stylesheet" type="text/css" /> <!-- Font --> |
| | | |
- | <style type ='text/css'> | + | <style> |
| + | |
| /* Wiki Hacks - START */ | | /* Wiki Hacks - START */ |
| /* Author: Pieter van Boheemen */ | | /* Author: Pieter van Boheemen */ |
Line 15: |
Line 70: |
| #catlinks{display:none;} | | #catlinks{display:none;} |
| #globalWrapper { background-color: transparent; border: none; margin: 0; padding: 0; width: 100%; height:100%;} | | #globalWrapper { background-color: transparent; border: none; margin: 0; padding: 0; width: 100%; height:100%;} |
- | #content { background-color: transparent; border: none; padding: 0; margin: 0; width: 100%; overflow: auto; height:100%;} | + | #content { border: none; padding: 20px; overflow: auto; height:100%; width:90%;} |
- | #bodyContent {background-color:transparent; border: none; padding:0; margin:0; width:100%; height:100%;}
| + | #top-section {display: block;position:fixed; border:3px; height:3px; width:100%;z-index:999;} |
- | #top-section {display: block;position:fixed; height:3px; width:100%;z-index:999;} | + | |
| #p-logo {display: none;} | | #p-logo {display: none;} |
| #search-controls {display: none;} | | #search-controls {display: none;} |
Line 34: |
Line 88: |
| | | |
| | | |
- | li{
| + | |
- | color:#FFF;
| + | #navigation { |
| + | font-size: 16px; |
| + | min-width: 1024px; |
| + | font-family: 'PT Sans Narrow', Arial, sans-serif; |
| + | margin: 0; |
| + | padding: 0 1em; |
| + | margin-bottom:40px; |
| + | margin-top:20px; |
| + | background: #003399; |
| + | height: 5em; |
| + | list-style: none; |
| + | opacity: 0.8; |
| + | border:3px solid #000; |
| + | border-radius: 25px; |
| } | | } |
| | | |
- | h1{
| + | #navigation > li { |
- | border:none;
| + | float: left; |
| + | height: 100%; |
| + | margin-right: 0.5em; |
| + | padding: 0 1em; |
| } | | } |
| | | |
- | </style>
| + | #navigation > li:first-child > a { |
| + | border-right:3px dotted #FFF; |
| + | background: url('https://static.igem.org/mediawiki/igem.org/f/f2/Igemfooterlogo.png') no-repeat; |
| + | padding-right:10px; |
| + | padding-top: 20px; |
| + | } |
| | | |
| + | #navigation > li > a { |
| + | float: left; |
| + | height: 100%; |
| + | color: #FFF; |
| + | text-decoration: none; |
| + | line-height: 5; |
| + | font-weight: bold; |
| + | text-transform: uppercase; |
| + | } |
| | | |
| + | #navigation > li > a:hover { |
| + | color: lightblue; |
| + | text-decoration: underline; |
| + | } |
| | | |
| | | |
- | </head>
| + | #navigation > li.sub { |
- | <body>
| + | position: relative; |
| + | } |
| | | |
- | <div id="contenedor">
| + | #navigation > li.sub ul { |
| + | width: 10em; |
| + | margin: 0; |
| + | padding: 1.5em 0; |
| + | list-style: none; |
| + | background: #003399; |
| + | position: absolute; |
| + | top: -1000em; |
| + | border-radius: 0px 0px 25px 25px; |
| + | } |
| | | |
- |
| + | #navigation > li.sub ul li { |
| + | width: 90%; |
| + | margin: 0 auto 0.3em auto; |
| + | } |
| | | |
- | <div id="ac_content" class="ac_content">
| + | #navigation > li.sub ul li a { |
- |
| + | height: 100%; |
- | <h1><a href="https://igem.org"><img src="https://static.igem.org/mediawiki/igem.org/f/f2/Igemfooterlogo.png"></a><span><b>Buenos Aires</b></span></h1>
| + | display: block; |
- | <div class="ac_menu">
| + | padding: 0.4em; |
- | <ul>
| + | color: #fff; |
- |
| + | font-weight: bold; |
- | <!-- Wiki Summary -->
| + | text-decoration: none; |
- | <li>
| + | } |
- | <a id="https://static.igem.org/mediawiki/2013/4/4e/Bg_bact2.jpg" href="#Summary">Summary</a>
| + | |
- | <div class="ac_subitem">
| + | |
- | <span class="ac_close"></span>
| + | |
- | <h2>Summary</h2>
| + | |
- | <ul>
| + | |
- | <li>Here you can find a brief introduction to our project</li>
| + | |
- | <li><a class="sub_menu_link" id="Summary" href="/Team:Buenos_Aires/_summary">Summary</a></li>
| + | |
- | </ul>
| + | |
- | </div>
| + | |
- | </li>
| + | |
- | <!-- Team -->
| + | |
- | <li>
| + | |
- | <a id="https://static.igem.org/mediawiki/2013/9/9a/Bg_bact3.jpg" href="#Team">Team</a>
| + | |
- | <div class="ac_subitem">
| + | |
- | <span class="ac_close"></span>
| + | |
- | <h2>Team</h2>
| + | |
- | <ul>
| + | |
- | <li>The Team.</li>
| + | |
| | | |
- | <li><a class="sub_menu_link" id="Students" href="/Team:Buenos_Aires/_students">Students</a></li>
| + | #navigation > li.sub ul li a:hover { |
- | <li><a class="sub_menu_link" id="Advisors" href="/Team:Buenos_Aires/_advisors">Advisors</a></li>
| + | background: #003399; |
- | <li><a class="sub_menu_link" id="Instructors" href="/Team:Buenos_Aires/_instructors">Instructors</a></li>
| + | text-decoration: underline; |
- |
| + | } |
- | </ul>
| + | |
- | </div>
| + | |
- | </li>
| + | |
- | <!-- Project-->
| + | |
- | <li>
| + | |
| | | |
- | <a id="https://static.igem.org/mediawiki/2013/e/e3/Bg_bact4.jpg" href="#Project">Project</a>
| + | #navigation > li.sub:hover ul { |
- | <div class="ac_subitem">
| + | top: 3em; |
- | <span class="ac_close"></span>
| + | } |
- | <h2>Project</h2>
| + | |
- | <ul>
| + | |
- | <li> We aim to build a quantitative modular Biosensor for the detection of
| + | |
- | toxic pollutants in water</li>
| + | |
- | <li><a class="sub_menu_link" id="Obj" href="/Team:Buenos_Aires/_abstract">Abstract</a></li>
| + | |
- | <li><a class="sub_menu_link" id="Mot" href="/Team:Buenos_Aires/_motivation">Motivation</a></li>
| + | |
- | <li><a class="sub_menu_link" id="Device" href="/Team:Buenos_Aires/_device">The Device</a></li>
| + | |
| | | |
- | </ul>
| + | </style> |
- | </div>
| + | |
- | </li>
| + | |
| | | |
- | <!-- Model--> | + | </head> |
- | <li>
| + | |
- | <a id="https://static.igem.org/mediawiki/2013/d/d0/Bg_bact5.jpg" href="#Model">Model</a>
| + | |
- | <div class="ac_subitem">
| + | |
- | <span class="ac_close"></span>
| + | |
- | <h2>Model</h2>
| + | |
- | <ul>
| + | |
- | <li>Mathematical model</li>
| + | |
- |
| + | |
- | </ul>
| + | |
- | </div>
| + | |
- | </li>
| + | |
| | | |
- | <!-- Results-->
| + | <ul id="navigation"> |
- | <li>
| + | |
- | <a id="https://static.igem.org/mediawiki/2013/d/d0/Bg_bact5.jpg" href="#Results">Results</a>
| + | |
- | <div class="ac_subitem">
| + | |
- | <span class="ac_close"></span>
| + | |
- | <h2>Results</h2>
| + | |
- | <ul>
| + | |
- | <li>Results of our experiments</li>
| + | |
- | <li><a class="sub_menu_link" id="resRFP" href="/Team:Buenos_Aires/_res_rfpdeg">Model</a></li>
| + | |
- | <li><a class="sub_menu_link" id="resmRFP" href="/Team:Buenos_Aires/_res_qrfp">mRFP quantification</a></li>
| + | |
- | <li><a class="sub_menu_link" id="resGFPr" href="/Team:Buenos_Aires/_res_rgfp">Response of GFP</a></li>
| + | |
- | <li><a class="sub_menu_link" id="resdmRFP" href="/Team:Buenos_Aires/_res_dmrfp">Discenibility of mRFP</a></li>
| + | |
- | <li><a class="sub_menu_link" id="resBasu" href="/Team:Buenos_Aires/_res_basu">Basu</a></li>
| + | |
| | | |
- | </ul>
| + | <li> |
- | </div>
| + | <!-- first child --> |
- | </li>
| + | <a href="#">Buenos aires</a> |
| + | </li> |
| + | |
| + | <li class="sub"> |
| + | |
| + | <a href="#">Team</a> |
| + | |
| + | <ul> |
| + | |
| + | <li><a href="#">Students</a></li> |
| + | <li><a href="#">Advisors</a></li> |
| + | <li><a href="#">Instructors</a></li> |
| + | |
| + | </ul> |
| + | |
| + | </li> |
| + | |
| + | <li class="sub"> |
| + | <a href="#">Project</a> |
| + | <ul> |
| + | |
| + | <li><a href="#">Abstract</a></li> |
| + | <li><a href="#">Motivation</a></li> |
| + | <li><a href="#">The Device</a></li> |
| + | |
| + | </ul> |
| + | </li> |
| | | |
| + | <!-- Model --> |
| + | <li class="sub"> |
| + | <a href="#">Model</a> |
| + | <ul> |
| + | |
| + | <li><a href="#">Abstract</a></li> |
| + | <li><a href="#">Motivation</a></li> |
| + | <li><a href="#">The Device</a></li> |
| + | |
| + | </ul> |
| + | </li> |
| | | |
- | <!-- Lab--> | + | <!-- Results --> |
- | <li>
| + | <li class="sub"> |
- | <a id="https://static.igem.org/mediawiki/2013/d/d0/Bg_bact5.jpg" href="#Lab">Lab</a>
| + | <a href="#">Results</a> |
- | <div class="ac_subitem">
| + | <ul> |
- | <span class="ac_close"></span>
| + | |
- | <h2>Lab</h2>
| + | <li><a href="#">mRFP Quantification</a></li> |
- | <ul>
| + | <li><a href="#">Response of GFP</a></li> |
- | <li>Lab</li>
| + | <li><a href="#">Discenibility</a></li> |
- |
| + | |
- | <li><a class="sub_menu_link" id="Obj" href="/Team:Buenos_Aires/_protocols">Protocols</a></li>
| + | </ul> |
- | | + | </li> |
- | <li><a class="sub_menu_link" id="Wetgallery" href="/Team:Buenos_Aires/_wetgallery">Gallery</a></li>
| + | </ul> |
- | </ul>
| + | |
- | </div>
| + | |
- | </li>
| + | |
- | | + | |
- | | + | |
- | | + | |
- | <!-- Parts -->
| + | |
- | <li>
| + | |
- | <a id="https://static.igem.org/mediawiki/2013/8/8f/Bg_bact6.jpg" href="#Parts">Parts</a>
| + | |
- | <div class="ac_subitem">
| + | |
- | <span class="ac_close"></span>
| + | |
- | <h2>Parts</h2>
| + | |
- | <ul>
| + | |
- | <li>Our biobricks</li>
| + | |
- | <li><a class="sub_menu_link" id="Obj" href="/Team:Buenos_Aires/_parts">Parts Used</a></li>
| + | |
- | <li><a class="sub_menu_link" id="Obj" href="/Team:Buenos_Aires/_parts">Parts Submitted</a></li>
| + | |
- | </ul>
| + | |
- | </div>
| + | |
- | </li>
| + | |
- | <!-- Safety-->
| + | |
- | <li>
| + | |
- | <a id="https://static.igem.org/mediawiki/2013/8/8f/Bg_bact6.jpg" href="#Safety">Safety</a>
| + | |
- | <div class="ac_subitem">
| + | |
- | <span class="ac_close"></span>
| + | |
- | <h2>Safety</h2>
| + | |
- | <ul>
| + | |
- | <li>Safety practices</li>
| + | |
- | <li><a class="sub_menu_link" id="Obj" href="/Team:Buenos_Aires/_safety">Safety</a></li>
| + | |
- | </ul>
| + | |
- | </div>
| + | |
- | </li>
| + | |
- | <!-- Human Practices-->
| + | |
- | <li>
| + | |
- | <a id="https://static.igem.org/mediawiki/2013/8/8f/Bg_bact6.jpg" href="#Human Practice">Human Practice</a>
| + | |
- | <div class="ac_subitem">
| + | |
- | <span class="ac_close"></span>
| + | |
- | <h2>Human Practice</h2>
| + | |
- | <ul>
| + | |
- | <li>The social objetive behind the competition</li>
| + | |
- | <li><a class="sub_menu_link" id="Obj" href="/Team:Buenos_Aires/_humanpractice">Human Practice</a></li> | + | |
- | | + | |
- | <li><a class="sub_menu_link" id="Outreach" href="/Team:Buenos_Aires/_outreach">Community Outreach</a></li>
| + | |
- | | + | |
- | | + | |
- | </ul>
| + | |
- | </div>
| + | |
- | </li>
| + | |
- | <li>
| + | |
- | <a id="https://static.igem.org/mediawiki/2013/8/8f/Bg_bact6.jpg" href="#References">References</a>
| + | |
- | <div class="ac_subitem">
| + | |
- | <span class="ac_close"></span>
| + | |
- | <h2>References</h2>
| + | |
- | <ul>
| + | |
- | <li>Our inspiration</li>
| + | |
- |
| + | |
- | <li><a class="sub_menu_link" id="Ref" href="/Team:Buenos_Aires/_references">References</a></li>
| + | |
- | </ul>
| + | |
- | </div>
| + | |
- | </li>
| + | |
- |
| + | |
- | </ul>
| + | |
- | </div>
| + | |
- | </div>
| + | |
- | | + | |
- | | + | |
- | <!--Here i put all the text that will open with links:-->
| + | |
- | | + | |
- | <!--PROJECT-->
| + | |
- | | + | |
- | <!--Objetive-->
| + | |
- | <!-- <iframe class="restricted" id="textObj" scrolling="no"-->
| + | |
- | <div class="text_loading"> Loading... </div>
| + | |
- | <div class="texto" id="textExt"> Hola
| + | |
- | | + | |
- | </div>
| + | |
- | | + | |
- | | + | |
- | | + | |
- | </div>
| + | |
- |
| + | |
- | <!-- The JavaScript -->
| + | |
- | <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js"></script>
| + | |
- | <script type="text/javascript" src="http://jquery-swip.googlecode.com/svn-history/r4/trunk/jquery.easing.1.3.js"></script>
| + | |
- | | + | |
- |
| + | |
- | | + | |
- | | + | |
- | <!--Hace girar las bacterias cuando se pone el mouse arriba-->
| + | |
- | <script type="text/javascript">
| + | |
- | $(document).ready(function(){
| + | |
- | $(".swing").hover(function(){
| + | |
- | $(".swing").css('-moz-transform', 'rotate(360deg)');
| + | |
- | $(".swing").css('-webkit-transform', 'rotate(360deg)');
| + | |
- | $(".swing").css('-o-transform', 'rotate(360deg)');
| + | |
- | $(".swing").css('-ms-transform', 'rotate(360deg)');
| + | |
- | },function(){
| + | |
- | $(".swing").css('-moz-transform', 'rotate(-360deg)');
| + | |
- | $(".swing").css('-webkit-transform', 'rotate(-360deg)');
| + | |
- | $(".swing").css('-o-transform', 'rotate(-360deg)');
| + | |
- | $(".swing").css('-ms-transform', 'rotate(-360deg)');
| + | |
- | });
| + | |
- | });
| + | |
- | </script>
| + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- |
| + | |
- | <script type="text/javascript">
| + | |
- | $(function() {
| + | |
- | var $ac_background = $('#ac_background'),
| + | |
- | $ac_bgimage = $ac_background.find('.ac_bgimage'),
| + | |
- | $ac_loading = $ac_background.find('.ac_loading'),
| + | |
- |
| + | |
- |
| + | |
- | $ac_content = $('#ac_content'),
| + | |
- | $title = $ac_content.find('h1'),
| + | |
- | $menu = $ac_content.find('.ac_menu'),
| + | |
- | $mainNav = $menu.find('ul:first'),
| + | |
- | $menuItems = $mainNav.children('li'),
| + | |
- | totalItems = $menuItems.length,
| + | |
- | $ItemImages = new Array();
| + | |
- |
| + | |
- | /*
| + | |
- | for this menu, we will preload all the images.
| + | |
- | let's add all the image sources to an array,
| + | |
- | including the bg image
| + | |
- | */
| + | |
- | $menuItems.each(function(i) {
| + | |
- | $ItemImages.push($(this).children('a:first').attr('id'));
| + | |
- | });
| + | |
- | $ItemImages.push($ac_bgimage.attr('src'));
| + | |
- |
| + | |
- |
| + | |
- | var Menu = (function(){
| + | |
- | var init = function() {
| + | |
- | loadPage();
| + | |
- | initWindowEvent();
| + | |
- | },
| + | |
- | loadPage = function() {
| + | |
- | /*
| + | |
- | 1- loads the bg image and all the item images;
| + | |
- | 2- shows the bg image;
| + | |
- | 3- shows / slides out the menu;
| + | |
- | 4- shows the menu items;
| + | |
- | 5- initializes the menu items events
| + | |
- | */
| + | |
- |
| + | |
- | $ac_loading.show();//show loading status image
| + | |
- | $.when(loadImages()).done(function(){
| + | |
- | $.when(showBGImage()).done(function(){
| + | |
- | //hide the loading status image
| + | |
- | $ac_loading.hide();
| + | |
- | $.when(slideOutMenu()).done(function(){
| + | |
- | $.when(toggleMenuItems('up')).done(function(){
| + | |
- | initEventsSubMenu();
| + | |
- | });
| + | |
- | });
| + | |
- | });
| + | |
- | });
| + | |
- | },
| + | |
- |
| + | |
- |
| + | |
- | | + | |
- | | + | |
- | showBGImage = function() {
| + | |
- | return $.Deferred(
| + | |
- | function(dfd) {
| + | |
- | //adjusts the dimensions of the image to fit the screen
| + | |
- | adjustImageSize($ac_bgimage);
| + | |
- | $ac_bgimage.fadeIn(1000, dfd.resolve);
| + | |
- | }
| + | |
- | ).promise();
| + | |
- | },
| + | |
- | slideOutMenu = function() {
| + | |
- | /* calculate new width for the menu */
| + | |
- | if($("#contenedor").width() > 1100){
| + | |
- | var new_w = $("#contenedor").width() - $title.outerWidth(true) - 15;
| + | |
- | } else {
| + | |
- | var new_w = 1024 - $title.outerWidth(true) - 15;
| + | |
- | }
| + | |
- | $(".texto").css('width', new_w - 130 + 'px');
| + | |
- | /* All links blank */
| + | |
- | $("a").css('color', '#FFF');
| + | |
- | return $.Deferred(
| + | |
- | function(dfd) {
| + | |
- | //slides out the menu
| + | |
- | $menu.stop()
| + | |
- | .animate({
| + | |
- | width : new_w + 'px'
| + | |
- | }, 700, dfd.resolve);
| + | |
- | }
| + | |
- | ).promise();
| + | |
- | },
| + | |
- | /* shows / hides the menu items */
| + | |
- | toggleMenuItems = function(dir) {
| + | |
- | return $.Deferred(
| + | |
- | function(dfd) {
| + | |
- | /*
| + | |
- | slides in / out the items.
| + | |
- | different animation time for each one.
| + | |
- | */
| + | |
- | $menuItems.each(function(i) {
| + | |
- | var $el_title = $(this).children('a:first'),
| + | |
- | marginTop, opacity, easing;
| + | |
- | if(dir === 'up'){
| + | |
- | marginTop = '0px';
| + | |
- | opacity = 1;
| + | |
- | easing = 'easeOutBack';
| + | |
- | }
| + | |
- | else if(dir === 'down'){
| + | |
- | marginTop = '60px';
| + | |
- | opacity = 0;
| + | |
- | easing = 'easeInBack';
| + | |
- | }
| + | |
- | $el_title.stop()
| + | |
- | .animate({
| + | |
- | marginTop : marginTop,
| + | |
- | opacity : opacity
| + | |
- | }, 200 + i * 200 , easing, function(){
| + | |
- | if(i === totalItems - 1)
| + | |
- | dfd.resolve();
| + | |
- | });
| + | |
- | });
| + | |
- | }
| + | |
- | ).promise();
| + | |
- | },
| + | |
- | initEventsSubMenu = function() {
| + | |
- | $menuItems.each(function(i) {
| + | |
- | var $item = $(this), // the <li>
| + | |
- | $el_title = $item.children('a:first'),
| + | |
- | el_image = $el_title.attr('id'),
| + | |
- | $sub_menu = $item.find('.ac_subitem'),
| + | |
- | $ac_close = $sub_menu.find('.ac_close');
| + | |
- | $text_loading = $('.text_loading');
| + | |
- | | + | |
- | if(i==0){
| + | |
- | openSubMenu($item, $sub_menu, el_image);
| + | |
- | loadText($("#Summary"));
| + | |
- | }
| + | |
- | | + | |
- |
| + | |
- | /* user clicks one item : appetizers | main course | desserts | wines | specials */
| + | |
- | $el_title.bind('click.Menu', function(e) {
| + | |
- |
| + | |
- | /* Menu Items doesnt disappear when link cliked */
| + | |
- | $(".ac_subitem").css("height", "0px");
| + | |
- | $(".ac_subitem").css("border", "none");
| + | |
- | /* all other text display is none*/
| + | |
- | //$('.texto').css({opacity: '0.0', display: 'none'});
| + | |
- | /* Mark other links as blank */
| + | |
- | $(".ac_content a").css('color', '#FFF');
| + | |
- | /* Current link in black */
| + | |
- | $el_title.css('color', '#000');
| + | |
- |
| + | |
- |
| + | |
- | //$.when(toggleMenuItems('down')).done(function(){
| + | |
- | openSubMenu($item, $sub_menu, el_image);
| + | |
- | //});
| + | |
- |
| + | |
- | return false;
| + | |
- | });
| + | |
- | /* closes the submenu */
| + | |
- | $ac_close.bind('click.Menu', function(e) {
| + | |
- | toggleMenuItems('up');
| + | |
- | $(".ac_subitem").css("height", "0px");
| + | |
- | $(".ac_subitem").css("border", "none");
| + | |
- | /* all other text display is none*/
| + | |
- | $('.texto').css({opacity: '0.0', display: 'none'});
| + | |
- |
| + | |
- | return false;
| + | |
- | });
| + | |
- | /* open link's text in "texto" class div */
| + | |
- |
| + | |
- |
| + | |
- | $(".sub_menu_link").bind('click.Menu', function(){
| + | |
- | loadText(this);
| + | |
- | | + | |
- | return false;
| + | |
- |
| + | |
- | });
| + | |
- | | + | |
- |
| + | |
- |
| + | |
- |
| + | |
- | });
| + | |
- | },
| + | |
- |
| + | |
- | | + | |
- | loadText = function(link) {
| + | |
- |
| + | |
- | $(".ac_subitem a").css('color', '#FFF');
| + | |
- | /* Change opacity for later animatation*/
| + | |
- | $('.texto').css({opacity:'0.2'});
| + | |
- | // $('.texto').css({display: 'none'});
| + | |
- |
| + | |
- | $(link).css('color', '#000');
| + | |
- | new_link = $(link).attr('href')+ " #external";
| + | |
- | $text_loading.appendTo('#Contenedor');
| + | |
- | $text_loading.show();
| + | |
- | | + | |
- | $('#textExt').load(new_link, function() {
| + | |
- | /* hide loading text: */
| + | |
- | $text_loading.hide();
| + | |
- | /*show external div in textExt*/
| + | |
- | $('#textExt').css({display: 'block'});
| + | |
- | $('#textExt').stop()
| + | |
- | .animate({opacity: '1'}, 1400, function(){});
| + | |
- | /*Bind function recursivily in the links of the external*/
| + | |
- | $('.texto a').css({color:"#68A"});
| + | |
- | | + | |
- | cargar();
| + | |
- | $('a.external.text').bind('click.Menu', function(){
| + | |
- | loadText(this);
| + | |
- | return false;
| + | |
- | });
| + | |
- | | + | |
- | | + | |
- | $('td a').bind('click.Menu', function(){
| + | |
- | loadText(this);
| + | |
- | return false;
| + | |
- | });
| + | |
- | });
| + | |
- | | + | |
- |
| + | |
- | | + | |
- |
| + | |
- |
| + | |
- | },
| + | |
- | | + | |
- | /* Carga una función javascript cuando abro un external link */
| + | |
- | cargar =function(){
| + | |
- | $.getScript('https://2013.igem.org/Team:Buenos_Aires/js/external.js?action=raw&ctype=text/javascript', function() {
| + | |
- | externa(); /*In this callback function you can fire the methods/functions defined in the loaded script file.*/
| + | |
- | prueba();
| + | |
- | });
| + | |
- | },
| + | |
| | | |
- | openSubMenu = function($item, $sub_menu, el_image) {
| |
- |
| |
- | $sub_menu.appendTo('#contenedor');
| |
- | $sub_menu.stop()
| |
- | .animate({
| |
- | height : '400px',
| |
- | marginTop : '120px'
| |
- |
| |
- | }, 400, function() {
| |
- | //the bg image changes
| |
- | $sub_menu.css({border: "solid black"});
| |
- | showItemImage(el_image);
| |
- | });
| |
- | },
| |
- | /* changes the background image */
| |
- | showItemImage = function(source) {
| |
- | //if its the current one return
| |
- | if($ac_bgimage.attr('src') === source)
| |
- | return false;
| |
- |
| |
- | var $itemImage = $('<img src="'+source+'" alt="Background" class="ac_bgimage"/>');
| |
- | $itemImage.insertBefore($ac_bgimage);
| |
- | adjustImageSize($itemImage);
| |
- | $ac_bgimage.fadeOut(1500, function() {
| |
- | $(this).remove();
| |
- | $ac_bgimage = $itemImage;
| |
- | });
| |
- | $itemImage.fadeIn(1500);
| |
- | },
| |
- | /*
| |
- | on window resize, ajust the bg image dimentions,
| |
- | and recalculate the menus width
| |
- | */
| |
- | initWindowEvent = function() {
| |
- | /* on window resize set the width for the menu */
| |
- | $(window).bind('resize.Menu' , function(e) {
| |
- | adjustImageSize($ac_bgimage);
| |
- | /* calculate new width for the menu */
| |
- | var new_w = $("#contenedor").width() - $title.outerWidth(true) - 15;
| |
- | $menu.css('width', new_w + 'px');
| |
- | $(".texto").css('width', new_w - 130 + 'px');
| |
- |
| |
- | });
| |
- | },
| |
- | /* makes an image "fullscreen" and centered */
| |
- | adjustImageSize = function($img) {
| |
- |
| |
- | $img.css({
| |
- | width : $(window).width + 'px',
| |
- | height : $(window).height + 'px',
| |
- |
| |
- | });
| |
- | },
| |
- | /* preloads a set of images */
| |
- | loadImages = function() {
| |
- | return $.Deferred(
| |
- | function(dfd) {
| |
- | var total_images = $ItemImages.length,
| |
- | loaded = 0;
| |
- | for(var i = 0; i < total_images; ++i){
| |
- | $('<img/>').load(function() {
| |
- | ++loaded;
| |
- | if(loaded === total_images)
| |
- | dfd.resolve();
| |
- | }).attr('src' , $ItemImages[i]);
| |
- | }
| |
- | }
| |
- | ).promise();
| |
- | };
| |
- |
| |
- | return {
| |
- | init : init
| |
- | };
| |
- | })();
| |
- |
| |
- | /*
| |
- | call the init method of Menu
| |
- | */
| |
- | Menu.init();
| |
- | });
| |
- | </script>
| |
- | </body>
| |
| </html> | | </html> |