Template:Team:HokkaidoU Japan/script

From 2011.igem.org

(Difference between revisions)
 
(30 intermediate revisions not shown)
Line 1: Line 1:
<html>
<html>
<script type="text/javascript">
<script type="text/javascript">
-
/*
+
jQuery.cookie=function(d,f,b){function e(j,i){if(j){if(i){return true}}return false}if(e(arguments.length>1,String(f)!=="[object Object]")){b=jQuery.extend({},b);if(f===null||f===undefined){b.expires=-1}if(typeof b.expires==="number"){var h=b.expires,c=b.expires=new Date();c.setDate(c.getDate()+h)}f=String(f);return(document.cookie=[encodeURIComponent(d),"=",b.raw?f:encodeURIComponent(f),b.expires?"; expires="+b.expires.toUTCString():"",b.path?"; path="+b.path:"",b.domain?"; domain="+b.domain:"",b.secure?"; secure":""].join(""))}b=f||{};var a,g=b.raw?function(i){return i}:decodeURIComponent;return(a=new RegExp("(?:^|; )"+encodeURIComponent(d)+"=([^;]*)").exec(document.cookie))?g(a[1]):null};
-
* jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/
+
-
*
+
-
* Uses the built in easing capabilities added In jQuery 1.1
+
-
* to offer multiple easing options
+
-
*
+
-
* TERMS OF USE - jQuery Easing
+
-
*
+
-
* Open source under the BSD License.
+
-
*
+
-
* Copyright © 2008 George McGinley Smith
+
-
* All rights reserved.
+
-
*
+
-
* Redistribution and use in source and binary forms, with or without modification,
+
-
* are permitted provided that the following conditions are met:
+
-
*
+
-
* Redistributions of source code must retain the above copyright notice, this list of
+
-
* conditions and the following disclaimer.
+
-
* Redistributions in binary form must reproduce the above copyright notice, this list
+
-
* of conditions and the following disclaimer in the documentation and/or other materials
+
-
* provided with the distribution.
+
-
*
+
-
* Neither the name of the author nor the names of contributors may be used to endorse
+
-
* or promote products derived from this software without specific prior written permission.
+
-
*
+
-
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+
-
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+
-
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+
-
*  COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
-
*  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
+
-
*  GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+
-
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+
-
*  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+
-
* OF THE POSSIBILITY OF SUCH DAMAGE.
+
-
*
+
-
*/
+
-
 
+
-
// t: current time, b: begInnIng value, c: change In value, d: duration
+
-
jQuery.easing['jswing'] = jQuery.easing['swing'];
+
-
 
+
-
jQuery.extend( jQuery.easing,
+
-
{
+
-
def: 'easeOutQuad',
+
-
swing: function (x, t, b, c, d) {
+
-
//alert(jQuery.easing.default);
+
-
return jQuery.easing[jQuery.easing.def](x, t, b, c, d);
+
-
},
+
-
easeInQuad: function (x, t, b, c, d) {
+
-
return c*(t/=d)*t + b;
+
-
},
+
-
easeOutQuad: function (x, t, b, c, d) {
+
-
return -c *(t/=d)*(t-2) + b;
+
-
},
+
-
easeInOutQuad: function (x, t, b, c, d) {
+
-
if ((t/=d/2) < 1) return c/2*t*t + b;
+
-
return -c/2 * ((--t)*(t-2) - 1) + b;
+
-
},
+
-
easeInCubic: function (x, t, b, c, d) {
+
-
return c*(t/=d)*t*t + b;
+
-
},
+
-
easeOutCubic: function (x, t, b, c, d) {
+
-
return c*((t=t/d-1)*t*t + 1) + b;
+
-
},
+
-
easeInOutCubic: function (x, t, b, c, d) {
+
-
if ((t/=d/2) < 1) return c/2*t*t*t + b;
+
-
return c/2*((t-=2)*t*t + 2) + b;
+
-
},
+
-
easeInQuart: function (x, t, b, c, d) {
+
-
return c*(t/=d)*t*t*t + b;
+
-
},
+
-
easeOutQuart: function (x, t, b, c, d) {
+
-
return -c * ((t=t/d-1)*t*t*t - 1) + b;
+
-
},
+
-
easeInOutQuart: function (x, t, b, c, d) {
+
-
if ((t/=d/2) < 1) return c/2*t*t*t*t + b;
+
-
return -c/2 * ((t-=2)*t*t*t - 2) + b;
+
-
},
+
-
easeInQuint: function (x, t, b, c, d) {
+
-
return c*(t/=d)*t*t*t*t + b;
+
-
},
+
-
easeOutQuint: function (x, t, b, c, d) {
+
-
return c*((t=t/d-1)*t*t*t*t + 1) + b;
+
-
},
+
-
easeInOutQuint: function (x, t, b, c, d) {
+
-
if ((t/=d/2) < 1) return c/2*t*t*t*t*t + b;
+
-
return c/2*((t-=2)*t*t*t*t + 2) + b;
+
-
},
+
-
easeInSine: function (x, t, b, c, d) {
+
-
return -c * Math.cos(t/d * (Math.PI/2)) + c + b;
+
-
},
+
-
easeOutSine: function (x, t, b, c, d) {
+
-
return c * Math.sin(t/d * (Math.PI/2)) + b;
+
-
},
+
-
easeInOutSine: function (x, t, b, c, d) {
+
-
return -c/2 * (Math.cos(Math.PI*t/d) - 1) + b;
+
-
},
+
-
easeInExpo: function (x, t, b, c, d) {
+
-
return (t==0) ? b : c * Math.pow(2, 10 * (t/d - 1)) + b;
+
-
},
+
-
easeOutExpo: function (x, t, b, c, d) {
+
-
return (t==d) ? b+c : c * (-Math.pow(2, -10 * t/d) + 1) + b;
+
-
},
+
-
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;
+
-
},
+
-
easeInCirc: function (x, t, b, c, d) {
+
-
return -c * (Math.sqrt(1 - (t/=d)*t) - 1) + b;
+
-
},
+
-
easeOutCirc: function (x, t, b, c, d) {
+
-
return c * Math.sqrt(1 - (t=t/d-1)*t) + b;
+
-
},
+
-
easeInOutCirc: function (x, t, b, c, d) {
+
-
if ((t/=d/2) < 1) return -c/2 * (Math.sqrt(1 - t*t) - 1) + b;
+
-
return c/2 * (Math.sqrt(1 - (t-=2)*t) + 1) + b;
+
-
},
+
-
easeInElastic: function (x, t, b, c, d) {
+
-
var s=1.70158;var p=0;var a=c;
+
-
if (t==0) return b;  if ((t/=d)==1) return b+c;  if (!p) p=d*.3;
+
-
if (a < Math.abs(c)) { a=c; var s=p/4; }
+
-
else var s = p/(2*Math.PI) * Math.asin (c/a);
+
-
return -(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
+
-
},
+
-
easeOutElastic: function (x, t, b, c, d) {
+
-
var s=1.70158;var p=0;var a=c;
+
-
if (t==0) return b;  if ((t/=d)==1) return b+c;  if (!p) p=d*.3;
+
-
if (a < Math.abs(c)) { a=c; var s=p/4; }
+
-
else var s = p/(2*Math.PI) * Math.asin (c/a);
+
-
return a*Math.pow(2,-10*t) * Math.sin( (t*d-s)*(2*Math.PI)/p ) + c + b;
+
-
},
+
-
easeInOutElastic: function (x, t, b, c, d) {
+
-
var s=1.70158;var p=0;var a=c;
+
-
if (t==0) return b;  if ((t/=d/2)==2) return b+c;  if (!p) p=d*(.3*1.5);
+
-
if (a < Math.abs(c)) { a=c; var s=p/4; }
+
-
else var s = p/(2*Math.PI) * Math.asin (c/a);
+
-
if (t < 1) return -.5*(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
+
-
return a*Math.pow(2,-10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )*.5 + c + b;
+
-
},
+
-
easeInBack: function (x, t, b, c, d, s) {
+
-
if (s == undefined) s = 1.70158;
+
-
return c*(t/=d)*t*((s+1)*t - s) + b;
+
-
},
+
-
easeOutBack: function (x, t, b, c, d, s) {
+
-
if (s == undefined) s = 1.70158;
+
-
return c*((t=t/d-1)*t*((s+1)*t + s) + 1) + b;
+
-
},
+
-
easeInOutBack: function (x, t, b, c, d, s) {
+
-
if (s == undefined) s = 1.70158;  
+
-
if ((t/=d/2) < 1) return c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b;
+
-
return c/2*((t-=2)*t*(((s*=(1.525))+1)*t + s) + 2) + b;
+
-
},
+
-
easeInBounce: function (x, t, b, c, d) {
+
-
return c - jQuery.easing.easeOutBounce (x, d-t, 0, c, d) + b;
+
-
},
+
-
easeOutBounce: function (x, t, b, c, d) {
+
-
if ((t/=d) < (1/2.75)) {
+
-
return c*(7.5625*t*t) + b;
+
-
} else if (t < (2/2.75)) {
+
-
return c*(7.5625*(t-=(1.5/2.75))*t + .75) + b;
+
-
} else if (t < (2.5/2.75)) {
+
-
return c*(7.5625*(t-=(2.25/2.75))*t + .9375) + b;
+
-
} else {
+
-
return c*(7.5625*(t-=(2.625/2.75))*t + .984375) + b;
+
-
}
+
-
},
+
-
easeInOutBounce: function (x, t, b, c, d) {
+
-
if (t < d/2) return jQuery.easing.easeInBounce (x, t*2, 0, c, d) * .5 + b;
+
-
return jQuery.easing.easeOutBounce (x, t*2-d, 0, c, d) * .5 + c*.5 + b;
+
-
}
+
-
});
+
-
 
+
-
/*
+
-
*
+
-
* TERMS OF USE - EASING EQUATIONS
+
-
*
+
-
* Open source under the BSD License.
+
-
*
+
-
* Copyright © 2001 Robert Penner
+
-
* All rights reserved.
+
-
*
+
-
* Redistribution and use in source and binary forms, with or without modification,
+
-
* are permitted provided that the following conditions are met:
+
-
*
+
-
* Redistributions of source code must retain the above copyright notice, this list of
+
-
* conditions and the following disclaimer.
+
-
* Redistributions in binary form must reproduce the above copyright notice, this list
+
-
* of conditions and the following disclaimer in the documentation and/or other materials
+
-
* provided with the distribution.
+
-
*
+
-
* Neither the name of the author nor the names of contributors may be used to endorse
+
-
* or promote products derived from this software without specific prior written permission.
+
-
*
+
-
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+
-
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+
-
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+
-
*  COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+
-
*  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
+
-
*  GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+
-
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+
-
*  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+
-
* OF THE POSSIBILITY OF SUCH DAMAGE.
+
-
*
+
-
*/
+
</script>
</script>
<script type="text/javascript">
<script type="text/javascript">
-
// JavaScript Document
+
$('.right-menu, .left-menu').fadeTo(0, 0);
-
/*! Copyright (c) 2009 Brandon Aaron (http://brandonaaron.net)
+
$('.right-menu, .left-menu').bind('mouseover', function(){
-
* Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
+
$(this).fadeTo('slow', 1);
-
* and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
+
-
* Thanks to: http://adomas.org/javascript-mouse-wheel/ for some pointers.
+
-
* Thanks to: Mathias Bank(http://www.mathias-bank.de) for a scope bug fix.
+
-
*
+
-
* Version: 3.0.2
+
-
*
+
-
* Requires: 1.2.2+
+
-
*/
+
-
 
+
-
(function($) {
+
-
 
+
-
var types = ['DOMMouseScroll', 'mousewheel'];
+
-
 
+
-
$.event.special.mousewheel = {
+
-
setup: function() {
+
-
if ( this.addEventListener )
+
-
for ( var i=types.length; i; )
+
-
this.addEventListener( types[--i], handler, false );
+
-
else
+
-
this.onmousewheel = handler;
+
-
},
+
-
+
-
teardown: function() {
+
-
if ( this.removeEventListener )
+
-
for ( var i=types.length; i; )
+
-
this.removeEventListener( types[--i], handler, false );
+
-
else
+
-
this.onmousewheel = null;
+
-
}
+
-
};
+
-
 
+
-
$.fn.extend({
+
-
mousewheel: function(fn) {
+
-
return fn ? this.bind("mousewheel", fn) : this.trigger("mousewheel");
+
-
},
+
-
+
-
unmousewheel: function(fn) {
+
-
return this.unbind("mousewheel", fn);
+
-
}
+
});
});
-
 
-
 
-
function handler(event) {
 
-
var args = [].slice.call( arguments, 1 ), delta = 0, returnValue = true;
 
-
 
-
event = $.event.fix(event || window.event);
 
-
event.type = "mousewheel";
 
-
 
-
if ( event.wheelDelta ) delta = event.wheelDelta/120;
 
-
if ( event.detail    ) delta = -event.detail/3;
 
-
 
-
// Add events and delta to the front of the arguments
 
-
args.unshift(event, delta);
 
-
 
-
return $.event.handle.apply(this, args);
 
-
}
 
-
 
-
})(jQuery);
 
-
 
-
/**
 
-
* @version $Id:  $Revision
 
-
* @package jquery
 
-
* @subpackage lofslidernews
 
-
* @copyright Copyright (C) JAN 2010 LandOfCoder.com <@emai:landofcoder@gmail.com>. All rights reserved.
 
-
* @website    http://landofcoder.com
 
-
* @license This plugin is dual-licensed under the GNU General Public License and the MIT License
 
-
*/
 
-
// JavaScript Document
 
-
(function($) {
 
-
$.fn.lofJSidernews = function( settings ) {
 
-
return this.each(function() {
 
-
// get instance of the lofSiderNew.
 
-
new  $.lofSidernews( this, settings );
 
-
});
 
-
}
 
-
$.lofSidernews = function( obj, settings ){
 
-
this.settings = {
 
-
direction     : '',
 
-
mainItemSelector    : 'li',
 
-
navInnerSelector : 'ul',
 
-
navSelector  : 'li' ,
 
-
navigatorEvent : 'click',
 
-
wapperSelector: '.lof-main-wapper',
 
-
interval   : 4000,
 
-
auto     : true, // whether to automatic play the slideshow
 
-
maxItemDisplay : 3,
 
-
startItem : 0,
 
-
navPosition : 'vertical',
 
-
navigatorHeight : 100,
 
-
navigatorWidth : 310,
 
-
duration : 600,
 
-
navItemsSelector    : '.lof-navigator li',
 
-
navOuterSelector    : '.lof-navigator-outer' ,
 
-
isPreloaded : true,
 
-
easing : 'easeInOutQuad'
 
-
}
 
-
$.extend( this.settings, settings ||{} );
 
-
this.nextNo        = null;
 
-
this.previousNo    = null;
 
-
this.maxWidth  = this.settings.mainWidth || 600;
 
-
this.wrapper = $( obj ).find( this.settings.wapperSelector );
 
-
this.slides = this.wrapper.find( this.settings.mainItemSelector );
 
-
if( !this.wrapper.length || !this.slides.length ) return ;
 
-
// set width of wapper
 
-
if( this.settings.maxItemDisplay > this.slides.length ){
 
-
this.settings.maxItemDisplay = this.slides.length;
 
-
}
 
-
this.currentNo      = isNaN(this.settings.startItem)||this.settings.startItem > this.slides.length?0:this.settings.startItem;
 
-
this.navigatorOuter = $( obj ).find( this.settings.navOuterSelector );
 
-
this.navigatorItems = $( obj ).find( this.settings.navItemsSelector ) ;
 
-
this.navigatorInner = this.navigatorOuter.find( this.settings.navInnerSelector );
 
-
 
-
if( this.settings.navPosition == 'horizontal' ){
 
-
this.navigatorInner.width( this.slides.length * this.settings.navigatorWidth );
 
-
this.navigatorOuter.width( this.settings.maxItemDisplay * this.settings.navigatorWidth );
 
-
this.navigatorOuter.height( this.settings.navigatorHeight );
 
-
 
-
} else {
 
-
this.navigatorInner.height( this.slides.length * this.settings.navigatorHeight );
 
-
 
-
this.navigatorOuter.height( this.settings.maxItemDisplay * this.settings.navigatorHeight );
 
-
this.navigatorOuter.width( this.settings.navigatorWidth );
 
-
}
 
-
this.navigratorStep = this.__getPositionMode( this.settings.navPosition );
 
-
this.directionMode = this.__getDirectionMode(); 
 
-
 
-
 
-
if( this.settings.direction == 'opacity') {
 
-
this.wrapper.addClass( 'lof-opacity' );
 
-
$(this.slides).css('opacity',0).eq(this.currentNo).css('opacity',1);
 
-
} else {
 
-
this.wrapper.css({'left':'-'+this.currentNo*this.maxSize+'px', 'width':( this.maxWidth ) * this.slides.length } );
 
-
}
 
-
 
-
 
-
if( this.settings.isPreloaded ) {
 
-
this.preLoadImage( this.onComplete );
 
-
} else {
 
-
this.onComplete();
 
-
}
 
-
 
-
}
 
-
    $.lofSidernews.fn =  $.lofSidernews.prototype;
 
-
    $.lofSidernews.fn.extend =  $.lofSidernews.extend = $.extend;
 
-
 
-
$.lofSidernews.fn.extend({
 
-
 
 
-
startUp:function( obj, wrapper ) {
 
-
seft = this;
 
-
 
-
this.navigatorItems.each( function(index, item ){
 
-
$(item).click( function(){
 
-
seft.jumping( index, true );
 
-
seft.setNavActive( index, item );
 
-
} );
 
-
$(item).css( {'height': seft.settings.navigatorHeight, 'width':  seft.settings.navigatorWidth} );
 
-
})
 
-
this.registerWheelHandler( this.navigatorOuter, this );
 
-
this.setNavActive(this.currentNo );
 
-
 
-
if( this.settings.buttons ){
 
-
                if( typeof (this.settings.buttons) == "object" ){
 
-
                    this.registerButtonsControl( 'click', this.settings.buttons, this );
 
-
                }
 
-
}
 
-
if( this.settings.auto )
 
-
this.play( this.settings.interval,'next', true );
 
-
 
-
return this;
 
-
},
 
-
onComplete:function(){
 
-
setTimeout( function(){ $('.preload').fadeOut( 900 ); }, 400 ); this.startUp( );
 
-
},
 
-
preLoadImage:function(  callback ){
 
-
var self = this;
 
-
var images = this.wrapper.find( 'img' );
 
-
 
-
var count = 0;
 
-
images.each( function(index,image){
 
-
if( !image.complete ){  
 
-
image.onload =function(){
 
-
count++;
 
-
if( count >= images.length ){
 
-
self.onComplete();
 
-
}
 
-
}
 
-
image.onerror =function(){
 
-
count++;
 
-
if( count >= images.length ){
 
-
self.onComplete();
 
-
}
 
-
}
 
-
}else {
 
-
count++;
 
-
if( count >= images.length ){
 
-
self.onComplete();
 
-
}
 
-
}
 
-
} );
 
-
},
 
-
navivationAnimate:function( currentIndex ) {
 
-
if (currentIndex <= this.settings.startItem
 
-
|| currentIndex - this.settings.startItem >= this.settings.maxItemDisplay-1) {
 
-
this.settings.startItem = currentIndex - this.settings.maxItemDisplay+2;
 
-
if (this.settings.startItem < 0) this.settings.startItem = 0;
 
-
if (this.settings.startItem >this.slides.length-this.settings.maxItemDisplay) {
 
-
this.settings.startItem = this.slides.length-this.settings.maxItemDisplay;
 
-
}
 
-
}
 
-
this.navigatorInner.stop().animate( eval('({'+this.navigratorStep[0]+':-'+this.settings.startItem*this.navigratorStep[1]+'})'),
 
-
{duration:500, easing:'easeInOutQuad'} );
 
-
},
 
-
setNavActive:function( index, item ){
 
-
if( (this.navigatorItems) ){
 
-
this.navigatorItems.removeClass( 'active' );
 
-
$(this.navigatorItems.get(index)).addClass( 'active' );
 
-
this.navivationAnimate( this.currentNo );
 
-
}
 
-
},
 
-
__getPositionMode:function( position ){
 
-
if( position  == 'horizontal' ){
 
-
return ['left', this.settings.navigatorWidth];
 
-
}
 
-
return ['top', this.settings.navigatorHeight];
 
-
},
 
-
__getDirectionMode:function(){
 
-
switch( this.settings.direction ){
 
-
case 'opacity': this.maxSize=0; return ['opacity','opacity'];
 
-
default: this.maxSize=this.maxWidth; return ['left','width'];
 
-
}
 
-
},
 
-
registerWheelHandler:function( element, obj ){
 
-
element.bind('mousewheel', function(event, delta ) {
 
-
var dir = delta > 0 ? 'Up' : 'Down',
 
-
vel = Math.abs(delta);
 
-
if( delta > 0 ){
 
-
obj.previous( true );
 
-
} else {
 
-
obj.next( true );
 
-
}
 
-
return false;
 
-
});
 
-
},
 
-
registerButtonsControl:function( eventHandler, objects, self ){
 
-
for( var action in objects ){
 
-
switch (action.toString() ){
 
-
case 'next':
 
-
objects[action].click( function() { self.next( true) } );
 
-
break;
 
-
case 'previous':
 
-
objects[action].click( function() { self.previous( true) } );
 
-
break;
 
-
}
 
-
}
 
-
return this;
 
-
},
 
-
onProcessing:function( manual, start, end ){
 
-
this.previousNo = this.currentNo + (this.currentNo>0 ? -1 : this.slides.length-1);
 
-
this.nextNo = this.currentNo + (this.currentNo < this.slides.length-1 ? 1 : 1- this.slides.length);
 
-
return this;
 
-
},
 
-
finishFx:function( manual ){
 
-
if( manual ) this.stop();
 
-
if( manual ){
 
-
                if( this.settings.auto ){
 
-
                    this.play( this.settings.interval,'next', true );
 
-
                }
 
-
}
 
-
this.setNavActive( this.currentNo );
 
-
},
 
-
getObjectDirection:function( start, end ){
 
-
return eval("({'"+this.directionMode[0]+"':-"+(this.currentNo*start)+"})");
 
-
},
 
-
fxStart:function( index, obj, currentObj ){
 
-
if( this.settings.direction == 'opacity' ) {
 
-
$(this.slides).stop().animate({opacity:0}, {duration: this.settings.duration, easing:this.settings.easing} );
 
-
$(this.slides).eq(index).stop().animate( {opacity:1}, {duration: this.settings.duration, easing:this.settings.easing} );
 
-
}else {
 
-
this.wrapper.stop().animate( obj, {duration: this.settings.duration, easing:this.settings.easing} );
 
-
}
 
-
return this;
 
-
},
 
-
jumping:function( no, manual ){
 
-
this.stop();
 
-
if( this.currentNo == no ) return;
 
-
var obj = eval("({'"+this.directionMode[0]+"':-"+(this.maxSize*no)+"})");
 
-
this.onProcessing( null, manual, 0, this.maxSize )
 
-
.fxStart( no, obj, this )
 
-
.finishFx( manual );
 
-
this.currentNo  = no;
 
-
},
 
-
next:function( manual , item){
 
-
 
-
this.currentNo += (this.currentNo < this.slides.length-1) ? 1 : (1 - this.slides.length);
 
-
this.onProcessing( item, manual, 0, this.maxSize )
 
-
.fxStart( this.currentNo, this.getObjectDirection(this.maxSize ), this )
 
-
.finishFx( manual );
 
-
},
 
-
previous:function( manual, item ){
 
-
this.currentNo += this.currentNo > 0 ? -1 : this.slides.length - 1;
 
-
this.onProcessing( item, manual )
 
-
.fxStart( this.currentNo, this.getObjectDirection(this.maxSize ), this )
 
-
.finishFx( manual );
 
-
},
 
-
play:function( delay, direction, wait ){
 
-
this.stop();
 
-
if(!wait){ this[direction](false); }
 
-
var self  = this;
 
-
this.isRun = setTimeout(function() { self[direction](true); }, delay);
 
-
},
 
-
stop:function(){
 
-
if (this.isRun == null) return;
 
-
clearTimeout(this.isRun);
 
-
            this.isRun = null;
 
-
}
 
-
})
 
-
})(jQuery)
 
-
 
-
 
</script>
</script>
<script type="text/javascript">
<script type="text/javascript">
-
$('.right-menu, .left-menu').fadeTo(0);
+
(function(b){function a(d,c){if(d){if(c){return true}}return false}b.fn.lightbox_me=function(c){return this.each(function(){var f=b.extend({},b.fn.lightbox_me.defaults,c),m=b(),l=b(this),n=b('<iframe id="foo" style="z-index: '+(f.zIndex+1)+';border: none; margin: 0; padding: 0; position: absolute; width: 100%; height: 100%; top: 0; left: 0; filter: mask();"/>'),h=a(b.browser.msie,b.browser.version<7);if(f.showOverlay){var g=b(".js_lb_overlay:visible");if(g.length>0){m=b('<div class="lb_overlay_clear js_lb_overlay"/>')}else{m=b('<div class="'+f.classPrefix+'_overlay js_lb_overlay"/>')}}if(h){var e=/^https/i.test(window.location.href||"")?"javascript:false":"about:blank";n.attr("src",e);b("body").append(n)}b("body").append(l.hide()).append(m);if(f.showOverlay){i();m.css({position:"absolute",width:"100%",top:0,left:0,right:0,bottom:0,zIndex:(f.zIndex+2),display:"none"});if(!m.hasClass("lb_overlay_clear")){m.css(f.overlayCSS)}}if(f.showOverlay){m.fadeIn(f.overlaySpeed,function(){d();l[f.appearEffect](f.lightboxSpeed,function(){i();d();f.onLoad()})})}else{d();l[f.appearEffect](f.lightboxSpeed,function(){f.onLoad()})}if(f.parentLightbox){f.parentLightbox.fadeOut(200)}b(window).resize(i).resize(d).scroll(d).keyup(k);if(f.closeClick){m.click(function(o){j();o.preventDefault})}l.delegate(f.closeSelector,"click",function(o){j();o.preventDefault()});l.bind("close",j);l.bind("reposition",d);function j(){var o=l[0].style;if(f.destroyOnClose){l.add(m).remove()}else{l.add(m).hide()}if(f.parentLightbox){f.parentLightbox.fadeIn(200)}n.remove();l.undelegate(f.closeSelector,"click");b(window).unbind("reposition",i);b(window).unbind("reposition",d);b(window).unbind("scroll",d);b(document).unbind("keyup",k);if(h){o.removeExpression("top")}f.onClose()}function k(o){if(a(o.keyCode==27||a(o.DOM_VK_ESCAPE==27,o.which==0),f.closeEsc)){j()}}function i(){if(b(window).height()<b(document).height()){m.css({height:b(document).height()+"px"});n.css({height:b(document).height()+"px"})}else{m.css({height:"100%"});if(h){b("html,body").css("height","100%");n.css("height","100%")}}}function d(){var p=l[0].style;l.css({left:"50%",marginLeft:(l.outerWidth()/2)*-1,zIndex:(f.zIndex+3)});if(a((l.height()+80>=b(window).height()),(l.css("position")!="absolute"||h))){var o=b(document).scrollTop()+40;l.css({position:"absolute",top:o+"px",marginTop:0});if(h){p.removeExpression("top")}}else{if(l.height()+80<b(window).height()){if(h){p.position="absolute";if(f.centered){p.setExpression("top",'(document.documentElement.clientHeight || document.body.clientHeight) / 2 - (this.offsetHeight / 2) + (blah = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "px"');p.marginTop=0}else{var q=a(f.modalCSS,f.modalCSS.top)?parseInt(f.modalCSS.top):0;p.setExpression("top","((blah = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "+q+') + "px"')}}else{if(f.centered){l.css({position:"fixed",top:"50%",marginTop:(l.outerHeight()/2)*-1})}else{l.css({position:"fixed"}).css(f.modalCSS)}}}}}})};b.fn.lightbox_me.defaults={appearEffect:"fadeIn",appearEase:"",overlaySpeed:250,lightboxSpeed:300,closeSelector:".close",closeClick:true,closeEsc:true,destroyOnClose:false,showOverlay:true,parentLightbox:false,onLoad:function(){},onClose:function(){},classPrefix:"lb",zIndex:999,centered:false,modalCSS:{top:"40px"},overlayCSS:{background:"black",opacity:0.3}}})(jQuery);
-
$('.right-menu, .left-menu').bind('mouseover', function(){
+
</script>
-
$(this).fadeTo(100);
+
<script type="text/javascript">
-
}).bind('mouseout', function(){
+
$(function(){
-
$(this).fadeTo(100);
+
    var open = $.cookie('igem_hokkaidou_toc');
 +
    $.cookie('igem_hokkaidou_toc', open);
 +
    var $toc = $('#toc');
 +
    var $tab = $('<div>').addClass('toc-tab');
 +
    var $close = $('<div>').addClass('close');
 +
    var $wrapper = $('<div>').addClass('toc-wrapper');
 +
    $toc.before($tab);
 +
    $toc.wrap($wrapper);
 +
    $toc.before($close);
 +
    $('span.toctoggle').hide();
 +
    $wrapper = $('.toc-wrapper');
 +
    $wrapper.hide();
 +
    $tab.bind('click', function(){
 +
        $tab.hide();
 +
        $wrapper.fadeIn('normal');
 +
        $.cookie('igem_hokkaidou_toc', true);
 +
        $close.bind('click', function(){
 +
            $wrapper.fadeOut('normal');
 +
            $tab.show();
 +
            $.cookie('igem_hokkaidou_toc', false);
 +
        });
 +
    });
 +
    if(open === 'true'){
 +
        $tab.trigger('click');
 +
    }
 +
    var $tocmain = $('#toc');
 +
    var $toc = $('#toc ul');
 +
    $toc.css('display', 'block');
 +
    $.cookie('hidetoc', 0);
 +
    $tocmain.removeClass('tochidden');
});
});
-
 
+
</script>
-
</script></html>
+
<script>
 +
$(function(){
 +
    $('img').each(function(){
 +
        var thumb = $(this).attr('src');
 +
        var reg = new RegExp('^(\/wiki\/images)\/thumb');
 +
        if(thumb.match(reg)){
 +
            var image = thumb.replace(reg, '$1');
 +
            image = image.replace(/[^\/]+?$/, '').replace(/\/$/, '');
 +
            var $tag = $('<img>').attr('src', image);
 +
            $(this).closest('a').bind('click', function(){
 +
                $('<div>').append($tag).lightbox_me();
 +
                return false;
 +
            });
 +
        }
 +
    });
 +
});
 +
</script>
 +
</html>

Latest revision as of 03:24, 6 October 2011