// JavaScript Document

$(document).ready(function(){

	// Dropdown Menus

    $('.springboard').hover(
      function () {
		$(this).addClass('tab');
		$('.main-menu-link', this).addClass('tab');
        $('.dropdown', this).animate({opacity: 1.0}, 200).show(200);
      }, 
      function () {
		$('.dropdown', this).stop(true,true).hide(100);
		$(this).removeClass('tab');
		$('.main-menu-link', this).removeClass('tab');
	  }
    );

	// Cycle Marquee

	$('#marquee').cycle({ 
		fx:			'fade',
		speed:		1000,
		timeout:	6000, 
		delay:		2000,
		pause:		1//,
		//random:		1
	});

	$('#marquee').css('display','block');
	
	// TinyMCE
	
	$('textarea.wysiwyg').tinymce({
		script_url : '../template/scripts/tiny_mce/tiny_mce.js',
		theme : "advanced",
		plugins : "paste,fullscreen,iespell",
		theme_advanced_buttons1 : "cut,copy,paste,pastetext,pasteword,|,link,unlink,removeformat,cleanup,code,|,fullscreen",
		theme_advanced_buttons2 : "bold,italic,underline,|,justifyleft,justifycenter,justifyright,justifyfull,|,bullist,numlist,|,outdent,indent",
		theme_advanced_buttons3 : "",
		theme_advanced_toolbar_location : "top", 
		theme_advanced_toolbar_align : "left", 
		theme_advanced_statusbar_location : "bottom", 
		theme_advanced_resizing : true
	});
	
	$('textarea.wysiwygmin').tinymce({
		script_url : '../template/scripts/tiny_mce/tiny_mce.js',
		theme : "advanced",
		plugins : "paste",
		theme_advanced_buttons1 : "bold,italic,underline,cut,copy,paste,pastetext,pasteword,removeformat,code",
		theme_advanced_buttons2 : "",
		theme_advanced_buttons3 : "",
		theme_advanced_toolbar_location : "bottom", 
		theme_advanced_toolbar_align : "left", 
		theme_advanced_statusbar_location : "none", 
		theme_advanced_resizing : true
	});
	
	// Date Picker
	
	$('input.datepicker').datepick(); 

});

function confirmSubmit()
{
	var agree=confirm("Are you sure?");
	if (agree)
		return true ;
	else
		return false ;
}

