/*!
 * Custom JavaScript Library v1.4.2
 * http://www.publimediaweb.it/jspmw/custom.js
 *
 * Copyright 2010, Publimedia Web
 *
 */




//  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();
	$("a[title='Cal_Fusion']").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"); 
			}) 
	})

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

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


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

//  effetto slide-box
$(function(){
	$('.box-slide')
		.mouseover(function(){
			$(this).stop().animate({left: 0}, "fast"); 
			}) 
		.mouseout(function(){
			$(this).stop().animate({left: -165}, "fast");  
			}) 
	})

//  effetto slide-box
$(function(){
	$('.box-slideR')
		.mouseover(function(){
			$(this).stop().animate({left: 0}, "fast"); 
			}) 
		.mouseout(function(){
			$(this).stop().animate({left: -165}, "fast");  
			}) 
	})
