$(document).ready(function(){

	$('#nav').superfish({
		dropShadows: false
		//onInit: function(){
			//$('li:has(ul)>a:first-child span.sf-sub-indicator',this).each(function(key, a) {
				//var $a = $(a);
				//$a.html($.trim($a.html()));
			//});
		//}
	});

	$('#cycle').cycle({
		fx: 'fade'
	});
	
	$('a.media').media({
		width:300, 
		height:20
	});	
	
$(".popup").fancybox({
		'width'				: '30%',
		'height'			: '20%',
        'autoScale'     	: true,
        'transitionIn'		: 'none',
		'transitionOut'		: 'none',
		'type'				: 'iframe'
	});
	
	$('#testimonials').cycle({ 
		fx:     'scrollUp', 
		timeout: 10000, 
		delay:  -2000 
	});		

//	$('dl.gallery-item a').attr('rel','gallery');
//	$('dl.gallery-item a[rel="gallery"]').fancybox();

//	$('#movie').flash({
//		swf: '/wp-content/themes/bb/video/slider.swf',
//		width: 600,
//		height: 200,
//		wmode: 'transparent',
//		flashvars: {
//
//		}
//	});

//	$("#form").validate({
//		rules: {
//			field: {
//			  required: true,
//			  email: true,
//			  number: true
//			}
//		}
//	});

	$('a.top').click(function(){
	     $('html, body').animate({scrollTop: '0px'}, 300);
	     return false;
	});

	$("#recent-posts li:last-child").addClass("last");	
	
});
