/*   
Theme Name: Walliness
Theme URI: demo-wp.enovastudio.org
Description: Walliness is a simple underconstruction template, perfect for sites goes under maintenance or will be opened soon.
Author: Alessandro Tesoro (EnovaStudio)
Author URI: http://enovastudio.org
Version: 1.0

Script info: do stuff
*/

/******************************************************************
	Navigation Fx
******************************************************************/

$(function(){
	$('#navbar a')
		.css( {backgroundPosition: "0 0"} )
		.mouseover(function(){
			$(this).stop().animate({backgroundPosition:"(0 -44px)"}, {duration:250})
		})
		.mouseout(function(){
			$(this).stop().animate({backgroundPosition:"(0 0)"}, {duration:250})
		})
});

/******************************************************************
	Template Scroller Settings
******************************************************************/	

$(function() {
    $('#contents').cycle({
        fx:     'fade',
        speed:  'slow',
        nowrap:  0,
        timeout: 0,
        pager:  '#navbar',
        pagerAnchorBuilder: function(idx, slide) {
            // return sel string for existing anchor
            return '#navbar li:eq(' + (idx) + ') a';
        }
    });
});

/******************************************************************
	Launch Date Settings
******************************************************************/	

$(document).ready(function(){
	var newYear = new Date(); 
	newYear = new Date(2011, 03-1, 1);
	$('#days').countdown({
		until: newYear, 
		layout: '{dnn}'
	});
	$('#hours').countdown({
		until: newYear, 
		layout: '{hnn}'
	});
	$('#minutes').countdown({
		until: newYear, 
		layout: '{mnn}'
	});
	$('#seconds').countdown({
		until: newYear, 
		layout: '{snn}'
	});
});

/******************************************************************
	Twitter Feeds
******************************************************************/	

getTwitters('feeds', {
    id: 'tunefuldesign', 
    count: 2, 
    withFriends: true, // currently disabled due to change in Twitter API
    enableLinks: true, 
    ignoreReplies: true,
    template: '<span class="twitterStatus">%text% <em class="twitterTime"><a href="http://twitter.com/%user_screen_name%/statuses/%id%">%time%</a></em></span> <img class="twitterPrefix" height="32" width="32" src="%user_profile_image_url%" />'
    });
