Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script>
- function getRandomInt (minni, maxi) {
- return Math.floor(Math.random() * (maxi - minni + 1)) + minni;
- }
- var INTERVAL;
- var SHAKEOBJECT;
- function getRandomEmpty(){
- var l=$(".empty_holder").length;
- return $(".empty_holder").eq(getRandomInt(0,l-1));
- }
- $(document).ready(function(){
- var minni=140;
- var maxi=290;
- $(".empty_holder .naru").each(function(){
- var h=getRandomInt(minni,maxi);
- $(this).height(h);
- });
- var minni=190;
- var maxi=290;
- $(".naru_holder .naru").each(function(){
- var h=getRandomInt(minni,maxi);
- $(this).height(h);
- });
- var minni=140;
- var maxi=190;
- $(".kyltti_holder .naru").each(function(){
- var h=getRandomInt(minni,maxi);
- $(this).height(h);
- });
- $(".kapala").mouseover(function(){
- $(this).addClass("over");
- }).mouseout(function(){
- $(this).removeClass("over");
- });
- $(".kapala").click(function(){
- //disable kaikki muut
- $(".kapala").unbind("mouseover");
- $(".kapala").unbind("mouseout");
- $(".kapala").unbind("click");
- $(".kapala").removeClass("over");
- $(".kapala").addClass("noact");
- var h=$(this).parent().find(".naru").height();
- h+=160;
- // $(this).parent().find(".naru").height(h);
- $(this).parent().find(".naru").animate({
- height:h
- }, 2000, function() {
- // Animation complete.
- });
- var empty=getRandomEmpty();
- var hempty=empty.find(".naru").height();
- hempty-=h;
- if(hempty<0){
- hempty=0;
- }
- //empty.find(".naru").height(hempty);
- empty.find(".naru").animate({
- height:hempty
- }, 2200, function() {
- // Animation complete.
- $(".naru_holder").hide();
- $(".empty_holder").hide();
- $(".kyltti_holder").hide();
- $("#nowin").show();
- });
- });
- });
- </script>
- <script>
- $('.btn-close').mouseover(function (e){
- TweenLite.to($(this), .4, {
- css:{
- scale:1.2,
- //ease:Bounce.easeIn,
- //rotation:"360deg",
- }
- });
- })
- $('.btn-close').mouseout(function (e){
- TweenLite.to($(this), .8, {
- css:{
- scale:1,
- //ease:Bounce.easeOut,
- //rotation:"0rad",
- }
- });
- })
- // SÄÄNNÖT
- $( ".rules" ).click(function() {
- $( "#rulesHolder" ).fadeIn( "slow", function() {
- // Animation complete
- });
- TweenLite.to($('.rulesContent'), .6, {
- css:{
- top:'90px',
- ease:Power3.easeOut,
- opacity:1,
- }
- });
- });
- $( ".btn-close" ).click(function() {
- $( "#rulesHolder" ).fadeOut( "slow", function() {
- });
- TweenLite.to($('.rulesContent'), .6, {
- css:{
- top:'-90px',
- ease:Power3.easeOut,
- opacity:0,
- }
- });
- });
- // PALKINNOT
- $( ".prizes" ).click(function() {
- $( "#prizesHolder" ).fadeIn( "slow", function() {
- // Animation complete
- });
- TweenLite.to($('.prizesContent'), .6, {
- css:{
- top:'90px',
- ease:Power3.easeOut,
- opacity:1,
- }
- });
- });
- $( ".btn-close" ).click(function() {
- $( "#prizesHolder" ).fadeOut( "slow", function() {
- });
- TweenLite.to($('.prizesContent'), .6, {
- css:{
- top:'-90px',
- ease:Power3.easeOut,
- opacity:0,
- }
- });
- });
- </script>
- <script>
- window.fbAsyncInit = function()
- {
- FB.init({ appId: '1443080979271297', // App ID,
- channelUrl: '//fb.satumaa.eu/narunvetoee/channel.php', // Channel File
- status: true,
- cookie: true,
- xfbml: true,
- oauth: true});
- FB.Canvas.setAutoGrow();
- }
- </script>
- <script>
- //<![CDATA[
- $(window).load(function() { // makes sure the whole site is loaded
- $('#status').fadeOut(); // will first fade out the loading animation
- $('#preloader').delay(350).fadeOut('slow'); // will fade out the white DIV that covers the website.
- $('body').delay(350).css({'overflow':'visible'});
- })
- //]]>
- </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement