// tinyMce
tinyMCE.init({
	language : "sv",
    mode : "textareas",
    theme : "advanced",
	plugins : "aspimage,paste",
    theme_advanced_buttons1 : "bold,italic,underline,separator,strikethrough,justifyleft,justifycenter,justifyright,justifyfull,bullist,numlist,undo,redo,link,unlink,|,image,|,code,|,pastetext",
    theme_advanced_buttons2 : "",
    theme_advanced_buttons3 : "",
    theme_advanced_toolbar_location : "top",
    theme_advanced_toolbar_align : "left",
    theme_advanced_statusbar_location : "bottom"
});

// Sortera
$(function() {
	$("ul#adminPage").sortable({ 
		axis: 'y',
		placeholder: 'placeholder',
		forcePlaceholderSize: true,
		update : function () {
			$("input#showArray").val($(this).sortable('toArray'));
		}
	});
	$("ul#page").sortable({ 
		axis: 'y',
		placeholder: 'placeholder',
		forcePlaceholderSize: true,
		update : function () {
			$("input#showArray2").val($(this).sortable('toArray'));
		}
	});
	
    $('.slideshow').cycle({
		fx: 'fade' // choose your transition type, ex: fade, scrollUp, shuffle, etc...
	});

	$("#message").slideDown("slow");
});

// Highslide

hs.graphicsDir = 'highslide/graphics/';
hs.align = 'center';
hs.transitions = ['expand', 'crossfade'];
hs.fadeInOut = true;
hs.wrapperClassName = 'wide-border';
hs.captionEval = 'this.a.title';
hs.numberPosition = 'caption';
hs.useBox = true;
hs.width = 800;
hs.height = 600;
hs.dimmingOpacity = 0.8;

// Add the slideshow providing the controlbar and the thumbstrip
hs.addSlideshow({
	//slideshowGroup: 'group1',
	interval: 5000,
	repeat: false,
	useControls: true,
	fixedControls: 'fit',
	overlayOptions: {
		position: 'bottom center',
		opacity: .75,
		hideOnMouseOut: true
	},
	thumbstrip: {
		position: 'above',
		mode: 'horizontal',
		relativeTo: 'expander'
	}
});

// Make all images animate to the one visible thumbnail
var miniGalleryOptions1 = {
	thumbnailId: 'thumb1'
}

