// JavaScript Document
$.flash.expressInstaller = '/wp-content/themes/template1/flash/expressInstall.swf';
var FlashAvailable = $.flash.available;

function createMailto(pref, suf) {
	var email = pref+'@'+suf;
	document.write('<a href="mailto:'+email+'">'+email+'</a>');
} 

$(document).ready(function(){

	$(".fancyBox, a[rel^=lightbox]").fancybox({
		prevEffect		: 'fade',
		nextEffect		: 'fade'
	});
	
	$("#trialMode").draggable({ handle: ".trialTitle" });
	
	$(".fancyBox_iframe").fancybox({
		'overlayShow'	: true,		
		'width'				: '95%',
		'height'			: '95%',
        'autoScale'     	: false,
        'transitionIn'		: 'none',
		'transitionOut'		: 'none',
		'type'				: 'iframe'
		
	});
				
	if(FlashAvailable && typeof(flashDisabled) == "undefined"){
		$('#carrousel_container').flash(
			{
				swf: '/wp-content/themes/template1/flash/webconcurrent_slider.swf',
				width: 700,
				height: 250,
				wmode: 'transparent',				
				flashvars: {
					src: 'xml.php'
				}
			}
		);
	} else {				
		if(typeof(imgArray) != "undefined"){
			for(var i in imgArray) $('#slider').append('<img src="'+imgArray[i]+'" alt="header" width="700" height="250" />');	
		}
		
		$("#slider").easyslide();				
	}
});
