// JavaScript Document


/* plugin */
jQuery.fn.dwFadingLinks = function(settings) {
  settings = jQuery.extend({
    color: '#ccc',
    duration: 500
  }, settings);
  return this.each(function() {
    var original = $(this).css('color');
    $(this).mouseover(function() { $(this).animate({ color: settings.color },settings.duration); });
    $(this).mouseout(function() { $(this).animate({ color: original },settings.duration); });
  });
};

// execute your scripts when the DOM is ready. this is mostly a good habit
jQuery(document).ready(function() {
	
	/*jQuery('.slideshow').cycle({
		timeout: 7000,
		fx: 'fade', // choose your transition type, ex: fade, scrollUp, shuffle, etc...
		cleartype: true,
		cleartypeNoBg: true,
		pager: '#pager'
	});
	jQuery('#goto1').click(function() {
		jQuery('.slideshow').cycle(0);
		return false;
	}); 
	
	jQuery('#goto2').click(function() { 
		jQuery('.slideshow').cycle(1);
		return false;
		});
	
	jQuery('#goto3').click(function() { 
		jQuery('.slideshow').cycle(2);
		return false;
		}); 
		

	/* twitter box
	jQuery("#twitterBox").tweet({
		count: 20,
		username: "topmedsaude",
		loading_text: "Carregando...",
		template: function(i){return i["text"]}
	}); */
	

jQuery('.slideshow').cycle({
		timeout: 7000,
		fx: 'fade', // choose your transition type, ex: fade, scrollUp, shuffle, etc...
		cleartype: true,
		cleartypeNoBg: true,
		pager: '#pager'
	});
	
	// menu hover effect
  $('.menu li a').hoverFadeColor();
	
	/* twitter box
	jQuery("div#twitter").tweet({
		count: 10,
		username: "lojaspax",
		loading_text: "Carregando...",
		template: function(i){return i["text"]}
	}); */
	
	// FancyBox
	
	$("a#single").fancybox();
	$(".aligncenter:parent").fancybox();
	/* Using custom settings
	
	$("a#inline").fancybox({
		'hideOnContentClick': true
	}); */

	/* Apply fancybox to multiple items */
	
	$("a.group").fancybox({
		'transitionIn'	:	'elastic',
		'transitionOut'	:	'elastic',
		'speedIn'		:	300, 
		'speedOut'		:	200, 
		'overlayShow'	:	false
	});
	
	/* initialize scrollable */
	jQuery(function()  { jQuery("div.scrollable").scrollable({circular: true}); });
	jQuery(function()  { jQuery("div.scrollableV").scrollable({circular: true, vertical: true}).autoscroll({ autoplay: true, interval: 5000 }); });
	jQuery(function()  { jQuery("div.scrollableVnoAuto").scrollable({circular: true, vertical: true}) });
	
	
});


