$(function(){ $('a[href^=#]').click(function(){ var speed = 500; var href= $(this).attr('href'); var target = $(href == '#' || href == '' ? 'html' : href); var position = target.offset().top; $('html, body').animate({scrollTop:position}, speed, 'swing'); return false; }); }); $(function(){ $('#lineup h1').click(function() { if($('#topPage').length === 0) { $(this).next().slideToggle(); $(this).toggleClass('active'); } }); }); $(function(){ var $elm = $('.js-capcomModal'); if($elm.length === 0){ return false; } // trigger $elm.colorbox({ className: "capcomCbox", height: "", maxWidth: "100%", maxHeight: "90%", fixed: true, }) }); /** * Flatten height same as the highest element for each row. * * Copyright (c) 2011 Hayato Takenaka * Dual licensed under the MIT and GPL licenses: * http://www.opensource.org/licenses/mit-license.php * http://www.gnu.org/licenses/gpl.html * @author: Hayato Takenaka (http://urin.take-uma.net) * @version: 0.0.2 **/ ;(function($) { $.fn.tile = function(columns) { var tiles, max, c, h, last = this.length - 1, s; if(!columns) columns = this.length; this.each(function() { s = this.style; if(s.removeProperty && /boxSizing/g.test(s)) s.removeProperty("height"); if(s.removeAttribute) s.removeAttribute("height"); }); return this.each(function(i) { c = i % columns; if(c == 0) tiles = []; tiles[c] = $(this); h = tiles[c].height(); if(c == 0 || h > max) max = h; if(i == last || c == columns - 1) $.each(tiles, function() { this.height(max); }); }); }; })(jQuery); $(window).load(function () { $('#lineup ul li .lineImg').tile(2); $('#lineup ul li a ').tile(2); if($('#topPage').length === 0) { $('#lineup').find('ul').hide(); } });