		//run the currently selected effect
	$(document).ready(function() {
							   
//      form select object script
			

		
		
	    $("#admin_data_table .admin_data_row:visible:even",this).addClass("evenRow"); 
   		$("#admin_data_table .admin_data_row:visible:odd",this).addClass("oddRow");
		
		$(function() {
			$("#tabs").tabs();
		});
								   
		var data = "Core Selectors Attributes Traversing Manipulation CSS Events Effects Ajax Utilities JSON hmmm terrible Nonsense Adore Anorthosis Andes Apple Ants Anteater Ali Apprehension Awe".split(" ");
		$("#searchfield").autocomplete(data);

		//DD_roundies.addRule('.ui-corner-all', 6, false);
		if ( $('.scrollable').length ) {
		$("div.scrollable").scrollable({
			size: 3,
			clickable: false,
			easing: 'swing',
			loop: true,
			speed: 700
		}).mousewheel(); 
		};

		var over = 80;
		var out = 250;

		$("#books_title").hide();
		$(".opacify").fadeTo(1, 1);
		
  		$(".opacify").hoverIntent(
    		function () {
      			$(this).fadeTo(over, 0);
			},
    		function () {
      			$(this).fadeTo(out, 1);
    		}
  		);

		//change text color on hover
		
		
		
		
		$(".rowHover").hoverIntent(
        function()
        {	
			if ($(this).hasClass("oddRow"))	{
            	$(this).animate(
                {
					 backgroundColor: "#eff8d1"
                }, "fast");
			}
			else {
            	$(this).animate(
                {
					 backgroundColor: "#dff398"
                }, "fast");
			};
        },
        function()
        {
			if ($(this).hasClass("oddRow"))	{
            	$(this).animate(
                {
					 backgroundColor: "#ffffff"
                }, "normal");
			}
			else {
            	$(this).animate(
                {
					 backgroundColor: "#eff8d1"
                }, "normal");
			};
        }
 	    );
		
		$(".triggerOpacify").hoverIntent(
        function()
        {
			$(this).find("#opacify_container").find(".opacify").fadeTo("fast", 0);
        },
        function()
        {
			$(this).find("#opacify_container").find(".opacify").fadeTo("normal", 1);
        }
 	    );
		
		
		
		// select date, title or subject sidebar
		$("#date_switch").click(
		function()
		{
			if ($("#books_date").not(':visible') ) {
				$("#books_date").show("fold","slow");
				if ($("#books_title").is(':visible') ) { $("#books_title").hide("fold","slow"); };
				if ($("#books_subject").is(':visible') ) { $("#books_subject").hide("fold","slow"); };
				$("#title_switch").css('color', '#E99900');
				$("#subject_switch").css('color', '#E99900');
				$("#date_switch").css('color', '#00929E');				
			}
		});
		$("#title_switch").click(
		function()
		{
			if ($("#books_title").not(':visible') ) {
				$("#books_title").show("fold","slow");
				if ($("#books_date").is(':visible') ) { $("#books_date").hide("fold","slow"); };
				if ($("#books_subject").is(':visible') ) { $("#books_subject").hide("fold","slow"); };
				$("#subject_switch").css('color', '#E99900');
				$("#date_switch").css('color', '#E99900');
				$("#title_switch").css('color', '#00929E');				
			}
		});
		$("#subject_switch").click(
		function()
		{
			if ($("#books_subject").not(':visible') ) {
				$("#books_subject").show("fold","slow");
				if ($("#books_subject").is(':visible') ) { $("#books_date").hide("fold","slow"); };
				if ($("#books_title").is(':visible') ) { $("#books_title").hide("fold","slow"); };
				$("#title_switch").css('color', '#E99900');
				$("#subject_switch").css('color', '#00929E');
				$("#date_switch").css('color', '#E99900');				
				
			}
		});
		$(".share").hide();
		$("#share01").hide();
		$("#share02").hide();
		$(".toggleShare").hoverIntent(
		function()
		{
//				$(".share:not(." + $(this).parent().find(".share").attr("id") + ")").hide("fold","slow");
				childShare = $(this).parent().find(".share");
//				$(".share:visible").not(childShare).hide("fold","slow");
				childShare.show("fold","slow");
		},
		function()
		{
//				$(".share:not(." + $(this).parent().find(".share").attr("id") + ")").hide("fold","slow");
				childShare = $(this).parent().find(".share");
//				$(".share:visible").not(childShare).hide("fold","slow");
				childShare.hide("fold","slow");
		}		);
		$("#toggleShare01").click(
		function()
		{
				if ($("#share02").is(':visible') ) { $("#share02").hide("fold","slow"); };
				$("#share01").toggle("fold","slow");
		});
		$("#toggleShare02").click(
		function()
		{
				if ($("#share01").is(':visible') ) { $("#share01").hide("fold","slow"); };
				$("#share02").toggle("fold","slow");
		});
		
		$("#journal_subscription_switch").click(
		function()
		{
			if ($("#journal_subscription").not(':visible') ) {
				$("#journal_subscription").show("fold","slow");
				$(".journal_chapter_section").not("#journal_subscription").hide("fold","slow");
			}
		});

	});

