//  ColorBox Gallery		
$(document).ready(function(){
	//Examples of how to assign the ColorBox event to elements.
	$("a[rel='jack']").colorbox({transition:"fade"});
	$("a[rel='dogs']").colorbox({transition:"elastic"});
	$("a[rel='river']").colorbox({transition:"none", width:"75%", height:"75%"});
	$(".slideshow").colorbox({slideshow:true});
	$("a.single").colorbox({}, function(){
		alert('Howdy, this is an example callback.');
	});
	
	$("a[rel='single']").colorbox({});
	$("a[title='Homer Defined']").colorbox();
	$(".flash").colorbox({href:"../content/flash.html"});
	$("a[href='http://google.com']").colorbox({width:"80%", height:"80%", iframe:true});
	
	//Example of preserving a JavaScript event for inline calls.
	$("#click").click(function(){ 
		$('#click').css({"background-color":"#f00", "color":"#fff", "cursor":"inherit"}).text("Open this window again and this message will still be here.");
	});
	$("#inline").colorbox({width:"50%", inline:true, href:"#inline_example1", title:"hello"});
});

// effetto fadeimg
$(document).ready(function(){ $('a img').addClass('fadeimg'); });
$(function(){
	$('.fadeimg')
		.mouseover(function(){
			$(this).stop().animate({opacity: 0.5}, "fast"); 
			}) 
		.mouseout(function(){
			$(this).stop().animate({opacity: 1.0}, "fast"); 
			}) 
	})

//  effetto slide-box
//$(function(){
//	$('.box-slide')
//		.click(function(){
//			$(this).stop().animate({left: 0}, {queue:false, duration:1000, easing: 'easeOutBounce'}); 
//		})
//		.click(function(){
//			$(this).stop().animate({left: -260}, "fast");  
//			}) 
//	})

$(function(){
	$('.box-slide')
		.mouseover(function(){
			$(this).stop().animate({left: 0}, {queue:false, duration:500, easing: 'easeOutBounce'}); 
			})
		.mouseout(function(){
			$(this).stop().animate({left: -260}, {queue:false, duration:1000, easing: 'easeOutBounce'});  
			}) 
	})

//  effetto slide-power
$(function(){
	$('.box-power')
		.click(function(){
			$(this).stop().animate({top: -260}, "fast");  
			}) 
	})

// home slider
$("#scrollable").scrollable({
	easing: 'swing',
	interval: '5000',
	size: '1',
	loop: 'false',
	prev: '#btn_prev' ,
	next: '#btn_next' ,
	navi:'#tabs',
	keyboard: true,
	speed: '100'
});

$("#scrollable_testimonial").scrollable({
	items: '.items_testimonial',
	easing: 'swing',
	size: '1',
	loop: 'false',
	next: '#btn_right1',
	navi:'#testimonial_nav',
	naviItem: 'a',
	keyboard: true,
	speed: '100'
});




