$(document).ready(function () {

	$(".app-button").mouseover(function(){
	    	$(this).addClass("ui-state-hover");
			}).mouseout(function(){
    		$(this).removeClass("ui-state-hover");
			}).mousedown(function(){
    		$(this).addClass("ui-state-active");
			}).mouseup(function(){
    		$(this).removeClass("ui-state-active");
			}).mouseout(function(){
    		$(this).removeClass("ui-state-active");
	});	

	$( "#events" ).accordion({
		icons: {},
		autoHeight: false
	});

	$('table.window tbody tr:not([th]):odd').addClass('odd');
	$('table.window tbody tr:not([th]):even').addClass('even');

	$("#input-news").cleditor({          
		width: 440, // width not including margins, borders or padding          
		height: 450, // height not including margins, borders or padding
		controls: "bold italic underline strikethrough | undo redo | removeformat | cut copy paste pastetext | source",
		useCSS: false, // use CSS to style HTML when possible (not supported in ie)          
		docType: "",
		docCSSFile: "css/cleditdoc.css",
		bodyStyle: "margin:4px; font:10pt Arial; cursor:text"        
	});

	$("#input-event").cleditor({          
		width: 440, // width not including margins, borders or padding          
		height: 450, // height not including margins, borders or padding
		controls: "bold italic underline strikethrough | font size | color removeformat | alignleft center alignright justify | undo redo | " +                        
			  "image link unlink | cut copy paste pastetext | source",
		colors:  "FFF EEE DDD CCC BBB AAA 999 888 777 666 555 444 333 222 111 000 A00",
		fonts: "Arial,Arial Black,Impact",
		sizes:  "1,2,3,4,5,6,7",
		useCSS: false, // use CSS to style HTML when possible (not supported in ie)          
		docType: "",
		docCSSFile: "css/cleditdoc.css",
		bodyStyle: "background: url(css/rockstars/images/bg-event.gif) 0 0 no-repeat rgb(20,20,20); color:white; margin:4px; font:10pt Arial; cursor:text"        
	});

	$("#date-event").datepicker({
		altField : '#date-event-mysql',
		altFormat : 'yy-mm-dd'
	});

	$("#btn-event-date").click(function() {
		$("#date-event").datepicker('show');
		return false;
	});

        $('#gallery a.thumb').lightBox();

});

