$(document).ready(function(){

//  $(document).pngFix(); 

  $("a[rel=external]").each(function(i){
    this.target="_blank";
  });

  $.fn.colorbox.settings.transition = "fade";
  $.fn.colorbox.settings.bgOpacity = "0.9";
  $.fn.colorbox.settings.contentCurrent = "afbeelding {current} van {total}";
  $(".colorbox").colorbox();

    $('div.post h2').flash(
        { 
            src: '/wp-content/themes/gravilux/lib/swf/dax-bold-2.swf', 
            wmode: 'transparent',
            flashvars: { 
                css: [
                    '* {color: #01579a; letter-spacing: -3px; font-size:22px;}',
                    'a { color: #0099CC; text-decoration: none; }',
                    'a:hover { text-decoration: underline; }'
                ].join(' ')
            }
        },
        { version: 7 },
        function(htmlOptions) {
            htmlOptions.flashvars.txt = this.innerHTML;
            this.innerHTML = '<div>'+this.innerHTML+'</div>';
            var $alt = $(this.firstChild);
            htmlOptions.height = $alt.height();
            htmlOptions.width = $alt.width();
            $alt.addClass('alt');
            $(this)
                .addClass('flash-replaced')
                .prepend($.fn.flash.transform(htmlOptions));						
        }
    );

    $('h4').flash(
        { 
            src: '/wp-content/themes/gravilux/lib/swf/dax-bold-2.swf', 
            wmode: 'transparent',
            flashvars: { 
                css: [
                    '* { color: #0099CC; letter-spacing: -1px; font-size:22px;}',
                    'a { color: #01579a; text-decoration: none; }',
                    'a:hover { color: #0099CC; text-decoration: none; }'
                ].join(' ')
            }
        },
        { version: 7 },
        function(htmlOptions) {
            htmlOptions.flashvars.txt = this.innerHTML;
            this.innerHTML = '<div>'+this.innerHTML+'</div>';
            var $alt = $(this.firstChild);
            htmlOptions.height = $alt.height();
            htmlOptions.width = $alt.width();
            $alt.addClass('alt');
            $(this)
                .addClass('flash-replaced')
                .prepend($.fn.flash.transform(htmlOptions));						
        }
    );

    $('.blockLeft h3').flash(
        { 
            src: '/wp-content/themes/gravilux/lib/swf/dax-bold-2.swf', 
            wmode: 'transparent',
            flashvars: { 
                css: [
                    '* { color: #33393a; letter-spacing: -1px; font-size:22px;}',
                    'a { color: #33393a; text-decoration: none; }',
                    'a:hover { text-decoration: underline; }'
                ].join(' ')
            }
        },
        { version: 7 },
        function(htmlOptions) {
            htmlOptions.flashvars.txt = this.innerHTML;
            this.innerHTML = '<div>'+this.innerHTML+'</div>';
            var $alt = $(this.firstChild);
            htmlOptions.height = $alt.height();
            htmlOptions.width = $alt.width();
            $alt.addClass('alt');
            $(this)
                .addClass('flash-replaced')
                .prepend($.fn.flash.transform(htmlOptions));						
        }
    );


    $('div.post .h2').flash(
        { 
            src: '/wp-content/themes/gravilux/lib/swf/dax-bold-2.swf', 
            wmode: 'transparent',
            flashvars: { 
                css: [
                    '* { color: #33393a; letter-spacing: -1px; font-size:22px;}',
                    'a { color: #33393a; text-decoration: none; }',
                    'a:hover { text-decoration: underline; }'
                ].join(' ')
            }
        },
        { version: 7 },
        function(htmlOptions) {
            htmlOptions.flashvars.txt = this.innerHTML;
            this.innerHTML = '<div>'+this.innerHTML+'</div>';
            var $alt = $(this.firstChild);
            htmlOptions.height = $alt.height();
            htmlOptions.width = $alt.width();
            $alt.addClass('alt');
            $(this)
                .addClass('flash-replaced')
                .prepend($.fn.flash.transform(htmlOptions));						
        }
    );

});
