Advertisement
ZiCdaMASTA

Hesburgeri Köievedu

May 9th, 2014
2,571
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.                        <script>
  2. function getRandomInt (minni, maxi) {
  3.     return Math.floor(Math.random() * (maxi - minni + 1)) + minni;
  4. }
  5. var INTERVAL;
  6. var SHAKEOBJECT;
  7. function getRandomEmpty(){
  8. var l=$(".empty_holder").length;   
  9.     return $(".empty_holder").eq(getRandomInt(0,l-1));
  10. }
  11.  
  12.     $(document).ready(function(){
  13.         var minni=140;
  14.         var maxi=290;
  15.         $(".empty_holder .naru").each(function(){
  16.                 var h=getRandomInt(minni,maxi);
  17.                 $(this).height(h);
  18.         });
  19.        
  20.         var minni=190;
  21.         var maxi=290;
  22.         $(".naru_holder .naru").each(function(){
  23.                 var h=getRandomInt(minni,maxi);
  24.                 $(this).height(h);
  25.         });
  26.         var minni=140;
  27.         var maxi=190;
  28.         $(".kyltti_holder .naru").each(function(){
  29.                 var h=getRandomInt(minni,maxi);
  30.                 $(this).height(h);
  31.         });
  32.        
  33.        
  34.        
  35.        
  36.         $(".kapala").mouseover(function(){
  37.            
  38.             $(this).addClass("over");
  39.         }).mouseout(function(){
  40.             $(this).removeClass("over");
  41.         });
  42.        
  43.        
  44.        
  45.         $(".kapala").click(function(){
  46.                 //disable kaikki muut
  47.                 $(".kapala").unbind("mouseover");
  48.                 $(".kapala").unbind("mouseout");
  49.                 $(".kapala").unbind("click");
  50.                 $(".kapala").removeClass("over");
  51.                 $(".kapala").addClass("noact");
  52.                 var h=$(this).parent().find(".naru").height();
  53.                 h+=160;
  54.             //  $(this).parent().find(".naru").height(h);
  55.                
  56.                
  57.                 $(this).parent().find(".naru").animate({
  58.   height:h
  59.    
  60.   }, 2000, function() {
  61.     // Animation complete.
  62.   });
  63.  
  64.  
  65.  
  66.                 var empty=getRandomEmpty();
  67.                
  68.                 var hempty=empty.find(".naru").height();
  69.                
  70.                 hempty-=h;
  71.            
  72.                 if(hempty<0){
  73.                 hempty=0;  
  74.                 }
  75.                
  76.                 //empty.find(".naru").height(hempty);
  77.                 empty.find(".naru").animate({
  78.   height:hempty
  79.    
  80.   }, 2200, function() {
  81.     // Animation complete.
  82.     $(".naru_holder").hide();
  83.     $(".empty_holder").hide();
  84.     $(".kyltti_holder").hide();
  85.     $("#nowin").show();
  86.   });
  87.         });
  88.     });
  89. </script>
  90.  
  91. <script>
  92.  
  93. $('.btn-close').mouseover(function (e){    
  94.         TweenLite.to($(this), .4, {
  95.             css:{
  96.                 scale:1.2,
  97.                 //ease:Bounce.easeIn,
  98.                 //rotation:"360deg",
  99.                 }
  100.             });
  101.     })
  102. $('.btn-close').mouseout(function (e){    
  103.         TweenLite.to($(this), .8, {
  104.             css:{
  105.                 scale:1,
  106.                 //ease:Bounce.easeOut,
  107.                 //rotation:"0rad",
  108.                 }
  109.             });
  110.     }) 
  111. // SÄÄNNÖT
  112. $( ".rules" ).click(function() {
  113.   $( "#rulesHolder" ).fadeIn( "slow", function() {
  114.     // Animation complete
  115.   });
  116.     TweenLite.to($('.rulesContent'), .6, {
  117.         css:{
  118.             top:'90px',
  119.             ease:Power3.easeOut,
  120.             opacity:1,
  121.             }
  122.         });
  123. });
  124. $( ".btn-close" ).click(function() {
  125.   $( "#rulesHolder" ).fadeOut( "slow", function() {
  126.   });
  127.   TweenLite.to($('.rulesContent'), .6, {
  128.         css:{
  129.             top:'-90px',
  130.             ease:Power3.easeOut,
  131.             opacity:0,
  132.             }
  133.         });
  134. });
  135. // PALKINNOT
  136. $( ".prizes" ).click(function() {
  137.   $( "#prizesHolder" ).fadeIn( "slow", function() {
  138.     // Animation complete
  139.   });
  140.     TweenLite.to($('.prizesContent'), .6, {
  141.         css:{
  142.             top:'90px',
  143.             ease:Power3.easeOut,
  144.             opacity:1,
  145.             }
  146.         });
  147. });
  148. $( ".btn-close" ).click(function() {
  149.   $( "#prizesHolder" ).fadeOut( "slow", function() {
  150.   });
  151.   TweenLite.to($('.prizesContent'), .6, {
  152.         css:{
  153.             top:'-90px',
  154.             ease:Power3.easeOut,
  155.             opacity:0,
  156.             }
  157.         });
  158. });
  159. </script>
  160.  
  161.  
  162.                                        <script>
  163. window.fbAsyncInit = function()
  164. {
  165.     FB.init({  appId: '1443080979271297', // App ID,
  166.      channelUrl: '//fb.satumaa.eu/narunvetoee/channel.php', // Channel File
  167.     status: true,
  168.     cookie: true,
  169.     xfbml: true,
  170.     oauth: true});
  171.  
  172.     FB.Canvas.setAutoGrow();
  173. }
  174. </script>
  175.  
  176.                        <script>
  177.     //<![CDATA[
  178.         $(window).load(function() { // makes sure the whole site is loaded
  179.             $('#status').fadeOut(); // will first fade out the loading animation
  180.             $('#preloader').delay(350).fadeOut('slow'); // will fade out the white DIV that covers the website.
  181.             $('body').delay(350).css({'overflow':'visible'});
  182.         })
  183.     //]]>
  184. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement