			jQuery.fn.makeFlashUpload = function() {
				var o = $(this[0]); // It's your element
				var image_name = o.attr('id');
				$(o).makeAsyncUploader({
					upload_url: "/borderzine2009/wp-content/themes/yamidoo/scripts/async-upload/async_upload.php", // Important! This isn't a directory, it's a HANDLER such as an ASP.NET MVC action method, or a PHP file, or a Classic ASP file, or an ASP.NET .ASHX handler. The handler should save the file to disk (or database).
					file_size_limit:'1 MB',
					flash_url:'/borderzine2009/wp-content/themes/yamidoo/scripts/swfupload.swf',
					file_types:"*.jpg; *.jpeg",
					file_types_description:'Only JPG Files Please',
					button_image_url: '/borderzine2009/wp-content/themes/yamidoo/scripts/blankButton.png',
					post_params : { 
						'name':image_name
					}
				});
			};

$(document).ready( function() {
	featuredcontentglider.init({
		gliderid: "headline-content",
		contentclass: "glidecontent",
		togglerid: "teaser",
		remotecontent: "",
		selected: 0,
		persiststate: false,
		speed: 500,
		direction: "leftright",
		autorotate: true,
		autorotateconfig: [9000, 0]
	});
	$('A[rel="external"]').click( function() {
        window.open( $(this).attr('href') );
        return false;
    });

	/* What's Your Border? Entry Form 
	$("input#photo-1").makeFlashUpload();
	$("input#photo-2").makeFlashUpload();
	$("input#photo-3").makeFlashUpload();
	$('#whats-your-border-form').validate({
		rules: {
			email:{
				email:true
			},
			"verify-email":{
				equalTo:"#email"
			}
		},
		messages : {
			"first-name" : 'Required',
			"last-name" : 'Required',
			"email": {
			   required: 'Required',
			   email: 'Invalid Email'
			 },
			"verify-email":'Please double-check your email entries: they don\'t match.',
			"whats-your-border-answer" : 'Required',
			"agree" : 'Please agree to the terms to submit your entry'
		}
	});
	*/
	/* What's Your Border? Vote Form */
	$('#whats-your-border-vote-form input.submit-button').hide();
	$('#whats-your-border-vote-form a.submit').removeClass('hidden');
	$('#whats-your-border-vote-form a.submit').click(function(){
		$('#whats-your-border-vote-form').submit();	
	});
	$('#whats-your-border-vote-form li.finalist label').click(function(){
		$(this).find('input').click();
	});
	$('#whats-your-border-vote-form li.finalist input').click(function(){
		$(this).parent().siblings().removeClass('selected');
		$(this).parent().addClass('selected');
	});
	$("a[rel^='lightbox']").slimbox();
	$("#slider.winner-slideshow").easySlider({
		auto: true,
		speed:1200,
		pause:3500
	});


});