' $("ul#images.rs-slider").append(larryFact); }); // Animate Fact Cube $('#images').refineSlide({ transition : 'cubeV', controls : 'arrows', autoPlay : true }); // Generate Articles $(data["articles"]).each(function (i, articleData) { var article = '' $("#articles").append(article); }); } !function($) { getData(); var cubeColors = new Array("#c41130", "#c6ced4", "#004812"); var cubeLetters = new Array("L", "A", "R", "Y", "S", "N", "D", "E"); var blocksX = Math.round(window.innerWidth/80); var blocksY = Math.round(window.innerHeight/80); totalBlocks = blocksX*blocksY; for (var i = 1; i != totalBlocks; i++) { $('#cubeAnimation').append('

'); }; $('.rs-slider > li > a').each(function(i, sliderItem){ cubeColor = cubeColors[Math.floor(Math.random()*cubeColors.length)] $(sliderItem).css({'border-color': cubeColor, 'color': cubeColor}); }); $('.cube').each(function(i, cube) { $('.larryLetter').append(function(){ larryLetter = cubeLetters[Math.floor(Math.random()*cubeLetters.length)] return larryLetter[i]; }); cubeColor = cubeColors[Math.floor(Math.random()*cubeColors.length)] $(cube).css({'border-color': cubeColor, 'color': cubeColor}); var sleepTime = Math.floor(Math.random() * 2000); var t = setTimeout(function() { var d = Math.floor(Math.random() * 1000); $(cube).fadeTo(d, 0.99); }, sleepTime); }); setTimeout(function(){ $('.introAnimate').fadeIn(); }, 2000); setTimeout(function(){ $('.pageAnimate').fadeIn('2000'); $('.cube').each(function(index, cube) { var sleepTime = Math.floor(Math.random() * 2000); var t = setTimeout(function() { var d = Math.floor(Math.random() * 2000); $(cube).fadeTo(d, 0); }, sleepTime); }); $('.introAnimate').fadeOut(''); }, 5000); setTimeout(function(){ $('#cubeAnimation').hide(); $('#videoPlayer iframe').attr('src', 'http://www.nba.com/.element/iframe/2.0/video/teamarticleplayer/teamarticleplayer.html?videoID=/video/teams/bucks/2013/04/05/LarryBlocksFinal4513mov-2435615&width=576&height=324&context=bucks'); $('.col.1 iframe').attr('src', 'http://up.massrelevance.com/massrel-products/avatar-wall-3/index.html?config=isd_05/mil_avatar_larry_130325'); $('.col.2 iframe').attr('src', 'http://up.massrelevance.com/massrel-products/counter-3/index.html?config=isd_05/mil_counter_larry_130325'); }, 8000); $('#modalCarousel').carousel() }(jq191);