﻿
var flashSourcesPath = "";

// Place flash
$(document).ready(function(){

                var contenttoplines = $("#contenttoplines");
                if (contenttoplines.length)
                {
                    $(contenttoplines).html("");
                }
                var contentcontainer = $("#contentcontainer");
                if (contentcontainer.length)
                {
                    $(contentcontainer).css("background", "none");
                }
                var homebottomlines = $("#homebottomlines");
                if (homebottomlines.length)
                {
                    $(homebottomlines).css("background", "none");
                }
				// Replace flash containers, parse options and set params
                
				var flashContainers = $('.flashHolder');
				var mediaContainers = $('.mediaHolder');
				var youtubeVideos = $('a.videoContainer');
				if (flashContainers.length) {
					for (var i=0; i<flashContainers.length; i++) {		
						$(flashContainers[i]).flash(null, { version: 8 }, function(htmlOptions) {
    		   				var $this = $(this);
					        var params = $this.attr('title').split(':');
					        htmlOptions.swliveconnect=true;
					        htmlOptions.src = flashSourcesPath + params[0];
			    		    htmlOptions.width = params[1];
				    	    htmlOptions.height = params[2];
							htmlOptions.wmode = 'transparent';
							htmlOptions.update = false;
							htmlOptions.expressInstall = false;
							htmlOptions.quality = 'high';
							htmlOptions.play = true;
							htmlOptions.allowScriptAccess = '*.*';
							htmlOptions.flashvars = "mapurl=" + flashSourcesPath + "/includes/" + params[3];
							this.title="";
					        this.innerHTML = "";
					        $this.replaceWith($.fn.flash.transform(htmlOptions));
						 });
					}
				}
				
		});

