/*  CUFON REPLACEMENTS 
------------------------------------------------------------------------------------------------------------------------------------------- */
Cufon.replace('ul.menu-nav li a, .single h1, .single h2, .number, .title1, #container h4, .title1, .vfp', { hover: true, fontFamily: 'Aller' }); 
Cufon.replace('.widget_menu li a, .single h3, .single h4, #container h2, #container h3, .footer-col h3, .footer-col h2, .title2, .title3, .title4, .row-head p', { hover: true, fontFamily: 'AllerLight' });
// textShadow: '0px -1px 0px #000'

/*  jQUERY CUSTOM FUNCTION 
------------------------------------------------------------------------------------------------------------------------------------------- */
jQuery(document).ready(function() {
								
	// Uniforms
	$(".form input, .form button, .form textarea, .form select").uniform();
	
	// Tabs
	$("ul.tabs").tabs("div.panes > .tabs-panes", {effect: 'slide', current: 'active', fadeInSpeed: 'slow', fadeOutSpeed : -100});
	//effect: 'default' 'fade' 'ajax' 'slide' 'horizontal' !!!
	
	// Scroll
	$(".scrollable").scrollable();
	
	// External Links Open in New Windows
	$("a[rel='external']").bind("click.external", function(){
	window.open(this.href);
	return false;
	});
	
	// LavaLamp Menu
	$("#animate").lavaLamp({
		fx: "easeOutBack",
		speed: 700
	});
		
	// Slides
	$('#slides').slides({
		preload: true,
		preloadImage: 'images/loading.gif',
		play: 18000,
		pause: 4000,
		hoverPause: true,
		crossfade:false,
		effect:'fade',
                fadeSpeed: 700,
                fadeEasing: "easeOutQuad",
		pagination:true
	});
	$('#slides').fadeIn(function(){
		$(this).removeAttr("filter");
	});
// Portfolio
	$('#folio').slides({
		preload: true,
		preloadImage: 'images/loading.gif',
		container:'folio_container',
		play: 7000,
		pause: 2500,
		pagination:false,
		generatePagination: false,
		hoverPause: true,
		effect:'slide',
                slideEasing: "easeOutQuad",
		crossfade:false
	});
	
	// Thumbs
	$('#thumbs a').hover(function(){
		$(this).find('img').stop(true, true).animate({'marginTop': 0}, 300);
		//$(this).find('span').stop(true, true).animate({'top': '94px'}, 300);		
		$(this).find('span').animate({'top': '-35px'}, 300);
		$(this).find('span').animate({ 'opacity': 0 }, 0);
		$(this).find('span').animate({'top': '94px'}, 0);
		 if ( $.browser.msie ) {
				$(this).find('span').animate({ 'opacity': 0.5 }, {duration: 2000});
				 } else { $(this).find('span').animate({ 'opacity': 1 }, {duration: 2000}); }
		//$(this).find('span').animate({ 'opacity': 1 }, 1000);
	}, function(){
		$(this).find('img').stop(true, true).animate({'marginTop': '-128px'}, 300);
		$(this).find('span').stop(true, true).animate({'top': '94px'}, 300);
	});
	
	// Thumbs Small Size
	$('#thumbsM a').hover(function(){
		$(this).find('img').stop(true, true).animate({'marginTop': 0}, 300);
		$(this).find('span').animate({'top': '-35px'}, 300);
		$(this).find('span').animate({ 'opacity': 0 }, 0);
		$(this).find('span').animate({'top': '53px'}, 0);
		 if ( $.browser.msie ) {
		$(this).find('span').animate({ 'opacity': 0.5 }, {duration: 2000});
		 } else { $(this).find('span').animate({ 'opacity': 1 }, {duration: 2000}); }
		
	}, function(){
		$(this).find('img').stop(true, true).animate({'marginTop': '-87px'}, 300);
		$(this).find('span').stop(true, true).animate({'top': '53px'}, 300);
	});
	

	
	// Portfolio Weblink
	$(".thumbs").hover(function () {
		$(this).find(".weblink").fadeIn();
	 }, function(){
		 $(this).find(".weblink").fadeOut("slow");
	});
	
	// Portfolio Weblink 2
	$(".thumbs2").hover(function () {
		$(this).find(".weblink2").fadeIn("normal");
	 }, function(){
		 $(this).find(".weblink2").fadeOut("slow");
	});

});
