$( document ).ready( function() {

// new window links
	$("a.form-link").click(function () {
    newwindow=window.open(this.href,'','height=600,width=440,scrollbars=1');
    return false;
		});
	$("a#video-link").click(function () {
    newwindow=window.open(this.href,'','height=420,width=600,scrollbars=1');
    return false;
		});
	$('a.new-window').click(function(){
    window.open(this.href);
    return false;
		});
	$("a.jukebox-link").click(function () {
    var features = "height=200,width=300";
    newwindow=window.open(this.href, 'Thaddeus Rex :: Jukebox', features);
    return false;
 		});

// videos
	$("div#general-promo").flowplayer("/flash/flowplayer-3.1.4.swf", {
		clip:	{
			url:			"/v/thaddeus-rex-promo.m4v",
			autoPlay: false
		}
	});
	$("div#ed-promo").flowplayer("/flash/flowplayer-3.1.4.swf", {
		clip:	{
			url:			"/v/thaddeus-rex-ed-promo-08-10.mp4",
			autoPlay: false
		}
	});
	$("div#wtwo").flowplayer("/flash/flowplayer-3.1.4.swf", {
		clip:	{
			url:			"/v/trexWTWO.mp4",
			autoPlay: false
		}
	});
		
// quotes-fe
	if ($.flash.available) {
		$('#quotes-fe > img').addClass('flash-hidden');
		$('#quotes-fe').flash({
			swf:		'http://thaddeusrex.com/flash/homeQuotesFe.swf',
			height:	150,
			width:	710,
			wmode:	"transparent"
		});
	}
	if ($.flash.available) {
		$('#eds-quotes-fe').flash({
			swf:		'http://thaddeusrex.com/flash/edsQuotesFe.swf',
			height:	400,
			width:	705,
			wmode:	"transparent"
		});
	}
	if ($.flash.available) {
		$('#wlars-quotes-fe').flash({
			swf:		'http://thaddeusrex.com/flash/wlars_flash.swf',
			height:	430,
			width:	705,
			wmode:	"transparent"
		});
	}

// rounded corners
	$('.rc').corner("3px");
});

// Set up the single-track audio player
AudioPlayer.setup("http://thaddeusrex.com/flash/home-player.swf", {  
  width: 215,
	transparentpagebg: "yes",
	lefticon: "ffffff",
	leftbg: "ed7c39",
	righticon: "ffffff",
	rightbg: "ed7c39"
});  
AudioPlayer.embed("track_player", {
	soundFile: "http://thaddeusrex.com/audio/shakininchicago.mp3",
	titles: "Shakin' in Chicago"
});
