diff options
author | Ugnich Anton | 2012-10-23 01:44:58 +0700 |
---|---|---|
committer | Ugnich Anton | 2012-10-23 01:44:58 +0700 |
commit | 9b94011a09685dec1b1b38fef8294c6ffa578079 (patch) | |
tree | ab6808f9f10a29628d9bb93905b1fcd3c2887b43 /web/scripts3.js | |
parent | adfc38138808eede6bcc29a706c9191e7d2d84fe (diff) |
JS/CSS optimization
Diffstat (limited to 'web/scripts3.js')
-rw-r--r-- | web/scripts3.js | 64 |
1 files changed, 35 insertions, 29 deletions
diff --git a/web/scripts3.js b/web/scripts3.js index 13686067..853734ed 100644 --- a/web/scripts3.js +++ b/web/scripts3.js @@ -2,12 +2,13 @@ function inlinevideo(mid) { var flashvars={ file:'http://i.juick.com/video/'+mid+'.mp4', image:'http://i.juick.com/thumbs/'+mid+'.jpg', - skin:'http://static.juick.com/glow.zip' + skin:'http://static.juick.com/glow.zip', + autostart:'true' }; var params={ allowfullscreen:'true' }; - swfobject.embedSWF('http://static.juick.com/player.swf','video-'+mid,'640','390','9.0.115','false',flashvars,params,null); + swfobject.embedSWF('http://static.juick.com/player.swf','video-'+mid,'512','384','9.0.115','false',flashvars,params,null); } function postformListener(formEl,ev) { @@ -62,33 +63,6 @@ function unfoldReply() { } } -$(document).ready(function() { - var tareply=$('textarea.reply'); - tareply.autoResize({ - extraSpace: 0, - minHeight: 1 - }); - tareply.click(function () { - $(this).addClass("narrow"); - $(this).after('<input type="submit" value="OK"/>'); - $(this).off('click'); - }); - - if(!!$('.stickya').offset()) { - var stickyTop = $('.stickya').offset().top; - $(window).scroll(function() { - var windowTop = $(window).scrollTop(); - if (stickyTop < windowTop) { - $('.stickya').css({ - position:'fixed' - }); - } else { - $('.stickya').css('position','absolute'); - } - }); - } -}); - /* * jQuery.fn.autoResize 1.14 */ @@ -364,3 +338,35 @@ $(document).ready(function() { }; })(jQuery); + +/******************************************************************************/ + +$(document).ready(function() { + var tareply=$('textarea.reply'); + tareply.autoResize({ + extraSpace: 0, + minHeight: 1 + }); + tareply.click(function () { + $(this).addClass("narrow"); + $(this).after('<input type="submit" value="OK"/>'); + $(this).off('click'); + }); + + if(!!$('.stickya').offset()) { + var stickyTop = $('.stickya').offset().top; + $(window).scroll(function() { + var windowTop = $(window).scrollTop(); + if (stickyTop < windowTop) { + $('.stickya').css({ + position:'fixed' + }); + } else { + $('.stickya').css('position','absolute'); + } + }); + } + + unfoldReply(); + $(window).bind('hashchange',unfoldReply); +}); |