/*Floating Menu Vars*/
//var name = "#submenu";
//var menuYloc = null;

$(document).ready(function(){
  
	// setup ul.tabs to work as tabs for each div directly under div.panes
	//$("ul#menu").tabs("div.panes > div");
	
	/*
	$("ul#submenu").tabs("div#panes > div", {
	
		effect: 'fade',
		fadeOutSpeed: "slow"
		
	});
	*/
	
	if($(".slidetabs").length != 0){
		$(".slidetabs").tabs(".images > div", {

			// enable "cross-fading" effect
			effect: 'fade',
			fadeInSpeed: 1000,
			fadeOutSpeed: 1000,

			// start from the beginning after the last tab
			rotate: true

		// use the slideshow plugin. It accepts its own configuration
		}).slideshow({
		
			autoplay: true,
			interval: 3000,
			clickable: false
		
		});
	}
	
	$(".rotating-tabs").tabs("> div", {

		// enable "cross-fading" effect
		effect: 'fade',
		fadeInSpeed: 1000,
		fadeOutSpeed: 1000,

		// start from the beginning after the last tab
		rotate: true

	// use the slideshow plugin. It accepts its own configuration
	}).slideshow({
	
		autoplay: true,
		interval: 5000,
		clickable: false
	
	});
	
	/*
	$(".rotating-image-400w-300h-tabs").tabs("> div", {

		// enable "cross-fading" effect
		effect: 'fade',
		fadeInSpeed: 1000,
		fadeOutSpeed: 1000,

		// start from the beginning after the last tab
		rotate: true

	// use the slideshow plugin. It accepts its own configuration
	}).slideshow({
	
		autoplay: true,
		interval: 5000,
		clickable: false
	
	});
	
	$(".rotating-image-640w-430h-tabs").tabs("> div", {

		// enable "cross-fading" effect
		effect: 'fade',
		fadeInSpeed: 1000,
		fadeOutSpeed: 1000,

		// start from the beginning after the last tab
		rotate: true

	// use the slideshow plugin. It accepts its own configuration
	}).slideshow({
	
		autoplay: true,
		interval: 5000,
		clickable: false
	
	});
	*/
	
	/*
	$("#testimonialswidget ul.testimonials").tabs("#testimonialswidget > div.testimonial", {

		// enable "cross-fading" effect
		effect: 'fade',
		fadeInSpeed: 1000,
		fadeOutSpeed: 1000,

		// start from the beginning after the last tab
		rotate: true

	// use the slideshow plugin. It accepts its own configuration
	}).slideshow({
	
		autoplay: true,
		interval: 6000,
		clickable: false
	
	});
	*/
	
	/*
	$("#newswidget ul.news").tabs("#newswidget > div.news", {

		// enable "cross-fading" effect
		effect: 'fade',
		fadeInSpeed: 1000,
		fadeOutSpeed: 1000,

		// start from the beginning after the last tab
		rotate: true

	// use the slideshow plugin. It accepts its own configuration
	}).slideshow({
	
		autoplay: true,
		interval: 6000,
		clickable: false
	
	});
	*/
	
	//Local scroll
	$.localScroll.hash({
		offset:-210
	});
	
	$.localScroll({
		offset:-210,
		hash: true
	});
	
	//Local scroll
	/*
	$('.slidetabs div').localScroll({
		offset:-295
	});
	*/
	
	/* Floating Menu */
	/*
	$('#submenu').stickyfloat({ duration: 400 });
	*/

	/*
	$('#navmenu-single').makeFloat({
		speed:'fast',
		x:0
		//y:
	});
	*/

	/*
    menuYloc = parseInt($(name).css("top").substring(0,$(name).css("top").indexOf("px")))  
    $(window).scroll(function(){
        var offset = menuYloc+$(document).scrollTop()+"px";
        $(name).animate({top:offset},{duration:500,queue:false});
    });
	*/

});
