Skip to content
This repository has been archived by the owner on Dec 5, 2018. It is now read-only.

Commit

Permalink
little js tweaking
Browse files Browse the repository at this point in the history
  • Loading branch information
darkhelmet committed Dec 31, 2009
1 parent e4369f3 commit 9bbca1d
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions public/javascripts/jquery.darkhax.js
@@ -1,12 +1,14 @@
(function($) {
$.fn.swfembed = function(movie, width, height) {
this.each(function() {
scale = 600 / width;
w = '600px';
h = (height * scale) + 'px';
swfobject.embedSWF(movie, this.id, w, h, '9.0.124', '/swf/expressInstall.swf', null, { wmode: 'opaque', allowFullscreen: true });
});
}
$.fn.extend({
swfembed: function(movie, width, height) {
this.each(function() {
scale = 600 / width;
w = '600px';
h = (height * scale) + 'px';
swfobject.embedSWF(movie, this.id, w, h, '9.0.124', '/swf/expressInstall.swf', null, { wmode: 'opaque', allowFullscreen: true });
});
}
});
})(jQuery);

var lightboxVars = { imageLoading: 'http://s3.blog.darkhax.com/lightbox-ico-loading.gif',
Expand Down Expand Up @@ -37,7 +39,7 @@ $(document).ready(function() {

$('.swfembed').each(function() {
t = $(this);
$(this).swfembed(t.attr('movie'), parseInt(t.attr('mwidth')), parseInt(t.attr('mheight')));
t.swfembed(t.attr('movie'), parseInt(t.attr('mwidth')), parseInt(t.attr('mheight')));
});

var query = $.map($('a[href$=#disqus_thread]'), function(a, index) {
Expand Down

0 comments on commit 9bbca1d

Please sign in to comment.