function stream(file, autostart, image, height){
		var so = new SWFObject('http://www.lastoliteschoolofphotography.com/4.6.swf', 'jwplayer', '460', height, '10');
		so.addParam('allowscriptaccess','always');
		so.addParam('allowfullscreen','true');
		so.addParam('menu','false');
		so.addVariable('volume','100');
		so.addVariable('backcolor','858585');
		so.addVariable('frontcolor','333333');
		so.addVariable('lightcolor','FFFFFF');
		so.addVariable('screencolor','000000');
		so.addVariable('streamer', 'rtmp://rtmp01.hddn.com/play');
		so.addVariable('file', 'vod/lsp.lastolitelimited2/'+file);
		so.addVariable('type', 'rtmp');	
		so.addVariable('autostart', autostart);
		so.addVariable('image', 'http://www.lastoliteschoolofphotography.com/stills/'+image);
		so.addVariable('plugins', 'gapro-1');
		so.addVariable('gapro.accountid', 'UA-2867982-1');
		so.addVariable("gapro.trackstarts","true");
		so.addVariable('gapro.trackcompletes', 'true');
		so.addVariable('gapro.trackpercentage', 'false');
		so.addVariable('gapro.tracktime', 'false');
		so.write('videolayer');
}
function progressive(file, autostart, image, height){
		var so = new SWFObject('http://www.lastoliteschoolofphotography.com/4.6.swf', 'jwplayer', '460', height, '10');
		so.addParam('allowscriptaccess','always');
		so.addParam('allowfullscreen','true');
		so.addParam('menu','false');
		so.addVariable('volume','100');
		so.addVariable('backcolor','858585');
		so.addVariable('frontcolor','333333');
		so.addVariable('lightcolor','FFFFFF');
		so.addVariable('screencolor','000000');
		so.addVariable('file', 'http://video.lastoliteschoolofphotography.com/vod/lsp.lastolitelimited2/'+file);	
		so.addVariable('type', 'lighttpd');
		so.addVariable('autostart', autostart);
		so.addVariable('image', 'http://www.lastoliteschoolofphotography.com/stills/'+image);
		so.addVariable('plugins', 'gapro-1');
		so.addVariable('gapro.accountid', 'UA-2867982-1');
		so.addVariable("gapro.trackstarts","true");
		so.addVariable('gapro.trackcompletes', 'true');
		so.addVariable('gapro.trackpercentage', 'false');
		so.addVariable('gapro.tracktime', 'false');
		so.write('videolayer');
}
/*
 * Url preview script 
 * powered by jQuery (http://www.jquery.com)
 * 
 * written by Alen Grakalic (http://cssglobe.com)
 * 
 * for more info visit http://cssglobe.com/post/1695/easiest-tooltip-and-image-preview-using-jquery
 *
 */
this.urlPreview = function(){	
	/* CONFIG */
		
		xOffset = 0;
		yOffset = -150;
		
		// these 2 variable determine popup's distance from the cursor
		// you might want to adjust to get the right result
		
	/* END CONFIG */
	$("a.tooltipimg").hover(function(e){
		this.t = this.title;
		this.title = "";	
		var c = (this.t != "") ? "<br/>" + this.t : "";
		$("body").append("<p id='tooltipimg'><img src='"+ this.rel +"' alt='url preview' />"+ c +"</p>");								 
		$("#tooltipimg")
			.css("top",(e.pageY - xOffset) + "px")
			.css("left",(e.pageX + yOffset) + "px")
			.fadeIn("fast");						
    },
	function(){
		this.title = this.t;	
		$("#tooltipimg").remove();
    });	
	$("a.tooltipimg").mousemove(function(e){
		$("#tooltipimg")
			.css("top",(e.pageY - xOffset) + "px")
			.css("left",(e.pageX + yOffset) + "px");
	});			
};


// starting the script on page load
$(document).ready(function(){
	urlPreview();
	$('.slideshow').cycle({
		fx: 'wipe,growX,growY,scrollLeft,scrollDown,scrollRight,scrollUp',
        randomizeEffects: true
	});
});

// tag dropdown menu
function doit(optionValue){
	window.location = optionValue;
};

// tech help function
function techhelp(url){
	$('#techhelplayer').slideDown();
	pageTracker._trackEvent('Links', 'View tech help section', url);
};

