//jQuery

$(document).ready(function(){

$(".navi").lavaLamp({
    fx: "backout",
    speed: 700,
    click: function(event, menuItem) {}
});

$('#animation').cycle({
    fx:     'fade', 
	speed: 1000,
	timeout: 4000
});

jQuery('#kamplist').accordion({
    header: '.head', 
    animated: 'easeslide',
	showSpeed: 'fast'
});

$('#portfolio li a').hover(function(){
					$(".cover", this).stop().animate({left:'325px'},{queue:false,duration:300});
				}, function() {
					$(".cover", this).stop().animate({left:'0px'},{queue:false,duration:300});
});
				
$("#portfolio a").fancybox({
				'overlayOpacity'	:	0.7,
				'overlayColor'		:	'#000'
});
			
$('#scroll a').click(function(){
		$.scrollTo( this.hash, 2500);
		return false;
});
	
$(".tweet").tweet({
            username: "fatcapmarketing",
            join_text: "auto",
            count: 5,
            loading_text: "Loading..."
});

$('ul#filter a').click(function() {
		$(this).css('outline','none');
		$('ul#filter .current').removeClass('current');
		$(this).parent().addClass('current');
		
		var filterVal = $(this).text().toLowerCase().replace(' ','-');
				
		if(filterVal == 'all') {
			$('ul#portfolio li.hidden').fadeIn('slow').removeClass('hidden');
		} else {
			
			$('ul#portfolio li').each(function() {
				if(!$(this).hasClass(filterVal)) {
					$(this).fadeOut('normal').addClass('hidden');
				} else {
					$(this).fadeIn('slow').removeClass('hidden');
				}
			});
		}
		
		return false;
});
        
});

// Font

var aller = { src: '/scripts/aller.swf' };

    sIFR.activate(aller);

    sIFR.replace(aller, {
      selector: 'h1.kamp'
      ,css: [
        '.sIFR-root { font-weight: bold; color:#8fbb24; }'
      ]
    });
	
    sIFR.replace(aller, {
      selector: 'h3.kamp'
      ,css: [
        '.sIFR-root { }'
      ]
    });
	
	 sIFR.replace(aller, {
      selector: 'h2.kamp'
      ,css: [
        '.sIFR-root { font-weight: bold;}'
      ]
    });
    
    sIFR.replace(aller, {
      selector: 'h1.titel'
      ,css: [
        '.sIFR-root { font-weight: bold; color:#8fbb24; }'
      ]
    });
	
//Blog-Updates
    
google.load("feeds", "1");

function OnLoad() {
  // Create a feed control
  var feedControl = new google.feeds.FeedControl();

  // Add two feeds.
  feedControl.addFeed("http://www.fatcapmarketing.com/blog/feed/");

  // Draw it.
  feedControl.draw(document.getElementById("wordpress"));
}

google.setOnLoadCallback(OnLoad);
