// Preamble slider
$(function(){
	$('#slider').anythingSlider({
		startPanel          : 1,         // This sets the initial panel
		hashTags            : false,     // Should links change the hashtag in the URL?
		
		buildArrows         : true,      // If true, builds the forwards and backwards buttons
		buildNavigation     : false,	     // If true, builds a list of anchor links to link to each panel
		buildStartStop      : false,      // If true, builds the start/stop button

		navigationFormatter : null,      // Details at the top of the file on this use (advanced use)
		forwardText         : "&raquo;", // Link text used to move the slider forward (hidden by CSS, replaced with arrow image)
		backText            : "&laquo;", // Link text used to move the slider back (hidden by CSS, replace with arrow image)
	
		autoPlay            : true,      // This turns off the entire slideshow FUNCTIONALY, not just if it starts running or not
		startStopped        : false,     // If autoPlay is on, this can force it to start stopped
		pauseOnHover        : false,      // If true & the slideshow is active, the slideshow will pause on hover
		resumeOnVideoEnd    : true,      // If true & the slideshow is active & a youtube video is playing, it will pause the autoplay until the video has completed
		stopAtEnd           : false,     // If true & the slideshow is active, the slideshow will stop on the last page
		startText           : "Start",   // Start button text
		stopText            : "Stop",    // Stop button text
		delay               : 5000,      // How long between slideshow transitions in AutoPlay mode (in milliseconds)
		animationTime       : 650,       // How long the slideshow transition takes (in milliseconds)
		easing              : "easeInOutExpo"    // Anything other than "linear" or "swing" requires the easing plugin
	});
});
// --- END


// Upload logotype button
$(document).ready(function(){	
	$('.file_upload').attr('disabled',true);
	$('input:file').change(function(){
		if ($(this).val()){
			$('.file_upload').removeAttr('disabled'); 
		}
		else {
			$('.file_upload').attr('disabled',true);
		}
	});
});
// --- END


// Loader image
$(document).ready(function(){	
	$('.loader_btn').click(function() {
		$('#loader_img').removeClass('hidden');
	});
	
	$('.loader_btn2').click(function() {
		$('#loader_img2').removeClass('hidden');
	});
});
// --- END


// Delete prompt
$(document).ready(function(){
	$("#delete").click(function() {
		$('#delete').addClass("hidden");
		$('#delete_prompt').removeClass("hidden");
	});
	
	$("#delete_cancel").click(function() {
		$('#delete').removeClass("hidden");
		$('#delete_prompt').addClass("hidden");
	});
});
// --- END


// Select all
function SelectAll(id){
	document.getElementById(id).focus();
	document.getElementById(id).select();
}
// --- END


// Language switch

// --- END

$(function(){
	$(document).click(function() {
    $('.lang').addClass('hidden');
	});
	$(".a-lang").click(function() {
    $('.lang').removeClass('hidden');
		return false;
	});
});
