/* Author: 

*/


$(document).ready(function() {

	var total = $('#slider a img').length;
	var rand = Math.floor(Math.random()*total);
//alert(total);
    $('#slider').nivoSlider({
        effect:'random', //Specify sets like: 'fold,fade,sliceDown'
        slices:8,
        animSpeed:400, //Slide transition speed
        pauseTime:4000,
        directionNav:false, //Next & Prev
        controlNav:false,
        startSlide:rand});
        
    $('#team-viewer').nivoSlider({
        effect:'fade', //Specify sets like: 'fold,fade,sliceDown'
        slices:8,
        animSpeed:400, //Slide transition speed
        pauseTime:4000,
        directionNav:true, //Next & Prev
        controlNav:false});
	
	$("#slider a").fancybox({
		'transitionIn'	:	'fade',
		'transitionOut'	:	'fade',
		'speedIn'		:	600, 
		'speedOut'		:	200,
		'cyclic'		:	true, 
		'overlayShow'	:	true,
		'padding'		:	0,
		'overlayColor'	:	'#fff',
		'overlayOpacity':	0.9,
		'onStart'		: function() {
	    $('#slider').data('nivoslider').stop(); //Stop the Slider
	},
		'onClosed'		: function() {
	    $('#slider').data('nivoslider').start(); //Start the Slider
	}
	});
	
	$("#social a").hover(function() {
        $(this).stop().animate({top: "-27"}, 140);
    }, function() {
        $(this).stop().animate({top: "0"}, 100);
    });
	
	
	
	
	
});

$(function(){
      $("#custom").tweet({
        count: 1,
        fetch: 10,
        filter: function(t){ return ! /^@\w+/.test(t["tweet_raw_text"]); },
        username: "nollie06"
      });
    });






















