﻿$(document).ready(function() {
	$('ul.sf-navmenu').superfish(
		{
			hoverClass: 'sfHover',          // the class applied to hovered list items 
			pathClass: 'current', // the class you have applied to list items that lead to the current page 
			pathLevels: 1,                  // the number of levels of submenus that remain open or are restored using pathClass 
			delay: 800,                // the delay in milliseconds that the mouse can remain outside a submenu without it closing 
			animation: { opacity: 'show' },   // an object equivalent to first parameter of jQuery’s .animate() method 
			speed: 'normal',           // speed of the animation. Equivalent to second parameter of jQuery’s .animate() method 
			autoArrows: true,               // if true, arrow mark-up generated automatically = cleaner source code at expense of initialisation performance 
			dropShadows: true,               // completely disable drop shadows by setting this to false 
			disableHI: false              // set to true to disable hoverIntent detection 
		});

	$('ul.admin-menu').superfish();

	$('.fade-home').innerfade(
		{
			animationtype: 'fade',
			speed: 'slow',
			timeout: 8000,
			type: 'sequence',
			containerheight: '180px'
		});

	try {
		featuredcontentslider.init({
			id: "fade-slider",  //id of main slider DIV
			contentsource: ["inline", ""],  //Valid values: ["inline", ""] or ["ajax", "path_to_file"]
			toc: "markup",  //Valid values: "#increment", "markup", ["label1", "label2", etc]
			nextprev: ["Previous", "Next"],  //labels for "prev" and "next" links. Set to "" to hide.
			revealtype: "mouseover", //Behavior of pagination links to reveal the slides: "click" or "mouseover"
			enablefade: [true, 0.33],  //[true/false, fadedegree]
			autorotate: [true, 8000],  //[true/false, pausetime]
			onChange: function(previndex, curindex) {  //event handler fired whenever script changes slide
				//previndex holds index of last slide viewed b4 current (1=1st slide, 2nd=2nd etc)
				//curindex holds index of currently shown slide (1=1st slide, 2nd=2nd etc)
			}
		});
	}
	catch (e) { }
	//finally { ; }

	try {
		$("#page-tabs > ul").tabs();
		$("#example > ul").tabs();
		$("#page-tabs > ui-tabs-panel").css('height', $("#page-tabs > ui-tabs-panel").height());
	}
	catch (e) { }


	//$(".ui-accordion-container").accordion();

	//    $('.fade500').innerfade({
	//        animationtype: 'fade',
	//        speed: 'slow',
	//        timeout: 8000,
	//        type: 'sequence',
	//        containerheight: '334px'
	//    });
	//    $('.fade480').innerfade({
	//        animationtype: 'fade',
	//        speed: 'slow',
	//        timeout: 8000,
	//        type: 'sequence',
	//        containerheight: '320px'
	//    });
	//    $('.fade360').innerfade({
	//        animationtype: 'fade',
	//        speed: 'slow',
	//        timeout: 8000,
	//        type: 'sequence',
	//        containerheight: '240px'
	//    });
	//    $('.fade240').innerfade({
	//        animationtype: 'fade',
	//        speed: 'slow',
	//        timeout: 4000,
	//        type: 'sequence',
	//        containerheight: '161px'
	//    });


	//themeload: function() {
	//    $('.fade').innerfade({
	//        animationtype: 'fade',
	//        speed: 'slow',
	//        timeout: 8000,
	//        type: 'sequence',
	//        containerheight: '344px'
	//    });

});
