$(document).ready(function(){
	$('.flash').flash(null, { version: 7, expressInstall: true}, function(htmlOptions) {
        var $this = $(this);
        var attributes = $this.attr('rel').split(":");
        htmlOptions.src = attributes[0];
        htmlOptions.width = attributes[1];
        htmlOptions.height = attributes[2];
		this.innerHTML = '';
        $this.addClass('flash-replaced').prepend($.fn.flash.transform(htmlOptions));
    });
    $('.galleri').flash(null, { version: 7, expressInstall: true}, function(htmlOptions) {
        var $this = $(this);
        var xml = $this.attr('rel');
        htmlOptions.src = '../_flash/gallery.swf';
        htmlOptions.width = 700;
        htmlOptions.height = 540;
		htmlOptions.flashvars = 'xmlfile=' + xml;
		this.innerHTML = '';
        $this.addClass('flash-replaced').prepend($.fn.flash.transform(htmlOptions));
    });
	$('.album').flash(null, { version: 7, expressInstall: true}, function(htmlOptions) {
        var $this = $(this);
        var xml = $this.attr('rel');
        htmlOptions.src = '../_flash/album.swf';
        htmlOptions.width = 700;
        htmlOptions.height = 540;
		htmlOptions.flashvars = 'xmlfile=' + xml;
		this.innerHTML = '';
        $this.addClass('flash-replaced').prepend($.fn.flash.transform(htmlOptions));
    });
	$('.smgalleri').flash(null, { version: 7, expressInstall: true}, function(htmlOptions) {
        var $this = $(this);
        var xml = $this.attr('rel');
        htmlOptions.src = '../_flash/smallslide.swf';
        htmlOptions.width = 446;
        htmlOptions.height = 320;
		htmlOptions.flashvars = 'xmlfile=' + xml;
		this.innerHTML = '';
        $this.addClass('flash-replaced').prepend($.fn.flash.transform(htmlOptions));
    });
});


