Template:Team:Newcastle

From 2013.igem.org

(Difference between revisions)
Line 1: Line 1:
-
<html>
+
alert("breakpoint 1");
-
<head>
+
-
        <link rel="stylesheet" type="text/css" href="https://2013.igem.org/Team:Newcastle/CSS/main_design?action=raw&ctype=text/css">
+
-
        <link rel="stylesheet" type="text/css" href="https://2013.igem.org/Team:Newcastle/CSS/col_layout?action=raw&ctype=text/css">
+
-
        <link rel="stylesheet" type="text/css" href="https://2013.igem.org/Team:Newcastle/CSS/carousel?action=raw&ctype=text/css">
+
-
        <link href="http://fonts.googleapis.com/css?family=Finger+Paint|Quando|Oregano" rel="stylesheet" type="text/css">
+
-
        <script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js" type="text/javascript"></script>
+
-
        <script src="https://2013.igem.org/Team:Newcastle/script/javascript.js?action=raw" type="text/javascript"> </script>
+
-
        <!--<script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script>-->
+
var toggleSpeed = 150;
-
        <link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css">
+
-
        <link rel="stylesheet" type="text/css" href="https://2013.igem.org/Team:Newcastle/CSS/shThemeDefault?action=raw&ctype=text/css" />
+
var current_display = 'main';
-
        <link rel="stylesheet" type="text/css" href="https://2013.igem.org/Team:Newcastle/CSS/shCore?action=raw&ctype=text/css" />
+
-
        <script type="text/javascript" src="https://2013.igem.org/Team:Newcastle/script/shCore.js?action=raw"></script>
+
var cur_main_display = 1;
-
        <script type="text/javascript" src="https://2013.igem.org/Team:Newcastle/script/shBrushMatlab.js?action=raw"> </script>
+
-
</head>
+
var leaveFeedOpen = false;
-
<body>
+
-
    <div>
+
-
    <div id="pop_up">
+
-
        <div id="pop_up_underlay">
+
-
              &nbsp;
+
-
        </div>
+
-
        <div id="pop_up_display">
+
-
            <div id="pop_up_close">X</div>
+
-
              <div id="pop_up_content">
+
-
                      &nbsp;
+
-
              </div>
+
-
        </div>
+
-
    </div>
+
-
    <div id="title_bar" class="grid_12">
+
-
            <img src="https://static.igem.org/mediawiki/2013/4/4d/Newcastle_Wiki_Header_Small.png" usemap="#igem">
+
-
              <map name="igem">
+
-
<area shape="rect" coords="700,0,800,65" href="https://igem.org/Main_Page" alt="IGEM" target="_blank">
+
-
<area shape="rect" coords="0,0,700,180" href="https://2013.igem.org/Team:Newcastle" alt="Home">
+
-
<area shape="rect" coords="700,65,940,180" href="http://www.ncl.ac.uk/" alt="Newcastle University" target="_blank">
+
-
</map>
+
var firstTimeOpened = true;
-
+
 
-
    </div>
+
var cur_content = "";
-
    <div class="menu" class="grid_12">
+
 
-
        <ul class="top_menu" style = "margin-left:10px" >
+
var mode = "temp";
-
            <li><a href="https://2013.igem.org/Team:Newcastle">Home</a></li>
+
 
-
            <li>
+
var tocLeft = "";
-
                <a href="#" onclick="return false;">Team</a>
+
 
-
                <ul>
+
var tocTopPerm = "";
-
                    <li><a href="https://igem.org/Team.cgi?year=2013&team_name=Newcastle" target="_blank">Official Profile</a></li>
+
 
-
                    <li><a href="/Team:Newcastle/Team">Individual Profiles</a></li>
+
$(function(){
-
                </ul>
+
   
-
            </li>
+
    //alert(msg);
-
            <li>
+
    /*
-
                <a href="#" onclick="return false;">Project</a>
+
    var loop1,
-
                <ul>
+
    c1 = 0;
-
                    <li><a href="https://2013.igem.org/Team:Newcastle/Project">Overview</a></li>
+
    var loop2,
-
                    <li><a href="https://2013.igem.org/Team:Newcastle/Project/L_forms">L-forms</a></li>
+
    c2 = 0;
-
                    <li><a href="https://2013.igem.org/Team:Newcastle/Project/shuffling_endosymbiosis">Genome Shuffling</a></li>
+
    var loop3,
-
                    <li><a href="https://2013.igem.org/Team:Newcastle/Project/plants">L-forms in Plants</a></li>
+
    c3 = 0;
-
                    <li><a href="https://2013.igem.org/Team:Newcastle/Project/shape_shifting">Shape Shifting</a></li>
+
    var loop4,
-
                </ul>
+
    c4 = 0;
-
            </li>
+
    /*
-
            <li>
+
    $('.box_2').on('mouseenter mouseleave', function( e ){
-
                <a href="#" onclick="return false;">Parts</a>
+
      if( e.type=='mouseleave' ){
-
                <ul>
+
        clearInterval( loop1 );
-
                    <li><a href="https://2013.igem.org/Team:Newcastle/Parts/l_form_switch">L-form Switch</a></li>
+
      }else{
-
                    <li><a href="https://2013.igem.org/Team:Newcastle/Parts/HBsu-fp">HBsu-xFP</a></li>
+
        loop1 = setInterval(function(){       
-
                </ul>
+
            $('.box_2 .slice').css({transform: "rotate("+ ( (++c1) % 360 ) +"deg)"});               
-
             </li>
+
        },30); 
-
             <li>
+
      }
-
                <a href="#" onclick="return false;">Models</a>
+
    });
-
                <ul>
+
   
-
                    <li><a href="https://2013.igem.org/Team:Newcastle/Modelling/Introduction">Introduction</a></li>
+
    $('.box_3').on('mouseenter mouseleave', function( e ){
-
                    <li><a href="https://2013.igem.org/Team:Newcastle/Modelling/BioNetGen">BioNetGen</a></li>
+
      if( e.type=='mouseleave' ){
-
                    <li><a href="https://2013.igem.org/Team:Newcastle/Modelling/CellShapeModel">Cell Shape Model</a><li>
+
        clearInterval( loop2 );
-
                    <li><a href="https://2013.igem.org/Team:Newcastle/Modelling/Cell_Fusion">Cell Fusion</a></li>
+
      }else{
-
                    <li><a href="https://2013.igem.org/Team:Newcastle/Modelling/Hbsu_Fusion_Protein">Hbsu-xFP</a></li>
+
        loop2 = setInterval(function(){       
-
                </ul>
+
            $('.box_3 .slice').css({transform: "rotate("+ ( (++c2 * -1) % 360 ) +"deg)"});               
-
            </li>
+
        },30); 
-
            <li>
+
      }
-
                <a href="#" onclick="return false;">Notebook</a>
+
    });
-
                <ul>
+
   
-
                    <li><a href="https://2013.igem.org/Team:Newcastle/Notebook/achievements">Achievements</a></li>
+
    $('.box_4').on('mouseenter mouseleave', function( e ){
-
                    <li><a href="https://2013.igem.org/Team:Newcastle/Notebook/timeline">Timeline</a></li>
+
      if( e.type=='mouseleave' ){
-
                    <li><a href="https://2013.igem.org/Team:Newcastle/Notebook/calendar">Calendar</a></li>
+
        clearInterval( loop3 );
-
                    <li><a href="https://2013.igem.org/Team:Newcastle/Notebook/protocols">Protocols</a></li>
+
      }else{
-
                    <li><a href="https://2013.igem.org/Team:Newcastle/Notebook/agenda">Meetings</a></li>
+
        loop3 = setInterval(function(){       
-
                </ul>
+
            $('.box_4 .slice').css({transform: "rotate("+ ( (++c3 * 1) % 360 ) +"deg)"});               
-
             </li>
+
        },30); 
-
             <li>
+
      }
-
                 <a href="#" onclick="return false;">Implications</a>
+
    });
-
                 <ul>
+
   
-
                    <li><a href="https://2013.igem.org/Team:Newcastle/Outreach/Overview">Overview</a></li>
+
    $('.box_5').on('mouseenter mouseleave', function( e ){
-
                    <li><a href="https://2013.igem.org/Team:Newcastle/Outreach/BioGame">BioGame</a></li>
+
      if( e.type=='mouseleave' ){
-
                    <li><a href="https://2013.igem.org/Team:Newcastle/Outreach/uk_meet">YSB 1.0</a></li>
+
        clearInterval( loop4 );
-
                    <li><a href="https://2013.igem.org/Team:Newcastle/Outreach/Workshop">Modelling Workshop</a></li>
+
      }else{
-
                    <li><a href="https://2013.igem.org/Team:Newcastle/Outreach/Architecture">Architecture Workshop</a></li>
+
        loop4 = setInterval(function(){       
-
                    <li><a href="https://2013.igem.org/Team:Newcastle/HP/Safety">Safety</a></li>
+
            $('.box_5 .slice').css({transform: "rotate("+ ( (++c4 * -1) % 360 ) +"deg)"});               
-
                    <li><a href="https://2013.igem.org/Team:Newcastle/HP/Synthetic_Bio">Synthetic Biology</a></li>
+
        },30); 
-
                    <li><a href="https://2013.igem.org/Team:Newcastle/HP/Ethics">Ethics</a></li>
+
      }
-
                    <li><a href="https://2013.igem.org/Team:Newcastle/HP/Law">Law</a></li>
+
    });
-
                </ul>
+
    */
-
            </li>
+
    /*
-
            <li>
+
    var agentStr = navigator.userAgent;
-
                <a href="#" onclick="return false;">Attributions</a>
+
    if (agentStr.indexOf("Trident/5.0") > -1) {
-
                <ul>
+
        if (agentStr.indexOf("MSIE 7.0") > -1)
-
                    <li><a href="https://2013.igem.org/Team:Newcastle/Collaborations">Collaborations</a></li>
+
             mode = "Compatibility View";
-
                    <li><a href="https://2013.igem.org/Team:Newcastle/Attributions">Acknowledgments</a></li>
+
        else
-
                    <li><a href="https://2013.igem.org/Team:Newcastle/Sponsors">Sponsors</a></li>
+
             mode = "IE9";
-
                </ul>
+
    }
-
             </li>
+
    else if (agentStr.indexOf("Trident/4.0") > -1) {
-
             <li><a href="https://2013.igem.org/Team:Newcastle/Architecture">Architecture</a></li>
+
        if (agentStr.indexOf("MSIE 7.0") > -1)
-
            <li><a href="https://2013.igem.org/Main_Page">iGEM</a></li>
+
            mode = "Compatibility View";
-
        </ul>
+
        else
-
        </ul>
+
            mode = "IE8";
-
     </div>
+
    }
-
</body>
+
    else
-
</html>
+
        mode = "IE7";
 +
    */
 +
    // Code for organising pages into viewable
 +
   
 +
    // Strip the hash
 +
    var href = (location.href).split("#");
 +
   
 +
    // Split the components
 +
    var url = href[0].split("/");
 +
   
 +
    // Check that you're not on the calendar and that you're not in Compatibility View
 +
    if(url[url.length - 1] != "calendar" && url[url.length - 1] != "Team:Newcastle")// && mode != "Compatibility View")
 +
    {
 +
        alert(url[url.length - 1]);
 +
        ParsePage(location.hash);
 +
   
 +
        $(window).scroll( function(e){
 +
           
 +
            var windowTop = $(window).scrollTop();
 +
            var tocTop = $('#toc').offset().top;
 +
            var contentTop = $('#page_content').offset().top - 10;
 +
            //alert(windowTop);
 +
           
 +
             if(windowTop > contentTop)
 +
             {
 +
                 $('#toc').css({'position': 'fixed',
 +
                              'top': '5px',
 +
                              'left':tocLeft});
 +
            } else
 +
            {
 +
                 $('#toc').css({'position': 'relative',
 +
                              'top': '0px',
 +
                              'left': '0px'});
 +
            }
 +
        });
 +
    }
 +
   
 +
    $('.top_menu li').hover(function(){
 +
        $(this).find('ul').slideDown(toggleSpeed);
 +
    }, function(){
 +
        $(this).find('ul').slideUp(toggleSpeed);
 +
    });
 +
   
 +
    $('#image_display .proj_box, #image_display .image_box').hover(function(){
 +
        $(this).find('.display_image').hide();
 +
        $(this).find('.under_text').show();
 +
    }, function(){
 +
        $(this).find('.display_image').show();
 +
        if(!($(this).hasClass('box_1')))
 +
            $(this).find('.under_text').hide();
 +
    });
 +
   
 +
    // Event handlers for closing the pop up box. Individual actions taken by a page must be created in that page's JQuery
 +
    $('#pop_up #pop_up_close').click(function(){
 +
        $('#pop_up').fadeOut();
 +
    });
 +
   
 +
    $('#pop_up #pop_up_underlay').click(function(){
 +
        $('#pop_up').fadeOut();
 +
    });
 +
    /*
 +
    if(mode != "Compatibility View")
 +
    {
 +
        $('.toclevel-2').click(function(){
 +
           
 +
            var href = $(this).children('a').attr('href');
 +
           
 +
            $('#toc').find('a[href="' + cur_content + '"]').toggleClass('active');
 +
            $('#bodyContent').find(cur_content + '_section').hide();
 +
            $('#bodyContent').find(href + '_section').show();
 +
              
 +
             cur_content = href;
 +
        });
 +
    }*/
 +
});
 +
 
 +
function ParsePage(hash)
 +
{
 +
    //('<div id="content">').insertAfter('#toc');
 +
    $('#toc').nextUntil('#logos').addClass("temp_for_wrap");
 +
    $('.temp_for_wrap').wrapAll('<div id="page_content">');
 +
   
 +
     tocLeft = $('#toc').offset().left - 10;
 +
    tocTopPerm = $('#toc').offset().top - $(window).scrollTop();
 +
}

Revision as of 20:27, 1 October 2013

alert("breakpoint 1");

var toggleSpeed = 150;

var current_display = 'main';

var cur_main_display = 1;

var leaveFeedOpen = false;

var firstTimeOpened = true;

var cur_content = "";

var mode = "temp";

var tocLeft = "";

var tocTopPerm = "";

$(function(){

   //alert(msg);
   /*
   var loop1,
   c1 = 0;
   var loop2,
   c2 = 0;
   var loop3,
   c3 = 0;
   var loop4,
   c4 = 0;
   /*
   $('.box_2').on('mouseenter mouseleave', function( e ){
      if( e.type=='mouseleave' ){
        clearInterval( loop1 );
      }else{
        loop1 = setInterval(function(){        
           $('.box_2 .slice').css({transform: "rotate("+ ( (++c1) % 360 ) +"deg)"});                
        },30);   
      }
   });
   
   $('.box_3').on('mouseenter mouseleave', function( e ){
      if( e.type=='mouseleave' ){
        clearInterval( loop2 );
      }else{
        loop2 = setInterval(function(){        
           $('.box_3 .slice').css({transform: "rotate("+ ( (++c2 * -1) % 360 ) +"deg)"});                
        },30);   
      }
   });
   
   $('.box_4').on('mouseenter mouseleave', function( e ){
      if( e.type=='mouseleave' ){
        clearInterval( loop3 );
      }else{
        loop3 = setInterval(function(){        
           $('.box_4 .slice').css({transform: "rotate("+ ( (++c3 * 1) % 360 ) +"deg)"});                
        },30);   
      }
   });
   
   $('.box_5').on('mouseenter mouseleave', function( e ){
      if( e.type=='mouseleave' ){
        clearInterval( loop4 );
      }else{
        loop4 = setInterval(function(){        
           $('.box_5 .slice').css({transform: "rotate("+ ( (++c4 * -1) % 360 ) +"deg)"});                
        },30);   
      }
   });
   */
   /*
   var agentStr = navigator.userAgent;
   if (agentStr.indexOf("Trident/5.0") > -1) {
       if (agentStr.indexOf("MSIE 7.0") > -1)
           mode = "Compatibility View";
       else
           mode = "IE9";
   }
   else if (agentStr.indexOf("Trident/4.0") > -1) {
       if (agentStr.indexOf("MSIE 7.0") > -1)
           mode = "Compatibility View";
       else
           mode = "IE8";
   }
   else
       mode = "IE7";
   */
   // Code for organising pages into viewable
   
   // Strip the hash
   var href = (location.href).split("#");
   
   // Split the components
   var url = href[0].split("/");
   
   // Check that you're not on the calendar and that you're not in Compatibility View
   if(url[url.length - 1] != "calendar" && url[url.length - 1] != "Team:Newcastle")// && mode != "Compatibility View")
   {
       alert(url[url.length - 1]);
       ParsePage(location.hash);
   
       $(window).scroll( function(e){
           
           var windowTop = $(window).scrollTop();
           var tocTop = $('#toc').offset().top;
           var contentTop = $('#page_content').offset().top - 10;
           //alert(windowTop);
           
           if(windowTop > contentTop)
           {
               $('#toc').css({'position': 'fixed',
                              'top': '5px',
                             'left':tocLeft});
           } else
           {
               $('#toc').css({'position': 'relative',
                              'top': '0px',
                             'left': '0px'});
           }
       });
   }
   
   $('.top_menu li').hover(function(){
       $(this).find('ul').slideDown(toggleSpeed);
   }, function(){
       $(this).find('ul').slideUp(toggleSpeed);
   });
   
   $('#image_display .proj_box, #image_display .image_box').hover(function(){
       $(this).find('.display_image').hide();
       $(this).find('.under_text').show();
   }, function(){
       $(this).find('.display_image').show();
       if(!($(this).hasClass('box_1')))
           $(this).find('.under_text').hide();
   });
   
   // Event handlers for closing the pop up box. Individual actions taken by a page must be created in that page's JQuery
   $('#pop_up #pop_up_close').click(function(){
       $('#pop_up').fadeOut();
   });
   
   $('#pop_up #pop_up_underlay').click(function(){
       $('#pop_up').fadeOut();
   });
   /*
   if(mode != "Compatibility View")
   {
       $('.toclevel-2').click(function(){
           
           var href = $(this).children('a').attr('href');
           
           $('#toc').find('a[href="' + cur_content + '"]').toggleClass('active');
           $('#bodyContent').find(cur_content + '_section').hide();
           $('#bodyContent').find(href + '_section').show();
           
           cur_content = href;
       });
   }*/

});

function ParsePage(hash) {

//('
').insertAfter('#toc');
   $('#toc').nextUntil('#logos').addClass("temp_for_wrap");
$('.temp_for_wrap').wrapAll('
');
   tocLeft = $('#toc').offset().left - 10;
   tocTopPerm = $('#toc').offset().top - $(window).scrollTop();
}