jQuery.noConflict();
	
jQuery(document).ready(function($){

   // lightboxes
   $("a[rel^='prettyPhoto']").prettyPhoto({
		animationSpeed: 'normal', /* fast/slow/normal */
		padding: 40, /* padding for each side of the picture */
		opacity: 0.35, /* Value betwee 0 and 1 */
		showTitle: true, /* true/false */
		allowresize: true, /* true/false */
		counter_separator_label: '/', /* The separator for the gallery counter 1 "of" 2 */
		theme: 'light_rounded', /* light_rounded / dark_rounded / light_square / dark_square */
		callback: function(){},
		overlay_gallery: false
	});
	
	// tooltips
	if($("a.tooltip")) $("a.tooltip").qtip({
   		tip: true,
	   	show: 'mouseover',
	   	hide: 'mouseout',
	   	position: {
	    	corner: {
	    		target: 'topMiddle',
	         	tooltip: 'bottomMiddle'
	      	}
	   	},
        style: { 
			width: 150,
			padding: 5,
			background: '#222222',
			color: 'white',
			textAlign: 'center',
			border: {
				width: 6,
				radius: 6,
				color: '#222222'
			},
			tip: 'bottomMiddle',
			name: 'dark' // Inherit the rest of the attributes from the preset dark style
	   	}
	});
	
	// scrollable 
	if($("div.scrollable")) {
		$("div.scrollable").scrollable({size: '4'}); 
		
		// album tooltip
		$("div.scrollable div.items div.album").each(function(i) {
			$(this).find("div.album_info").hide();
			$(this).mouseover(function() {
				$(this).find("div.album_info").show();
			});
			$(this).mouseout(function() {
				$(this).find("div.album_info").hide();
			});
		});
	}

   	// flash carousel 
	if($("#flash-carousel")) {
   		var flashvars = {
			xmlLocation: "../flash/data.it.xml"
		};
		var params = {
			menu: "false",
			wmode: "transparent",
			base: "../flash/"
		};
		var attributes = {
		};
   		swfobject.embedSWF("../flash/viewer_no_options.swf", "flash-carousel", "950", "450", "8.0.0", "../flash/expressInstall.swf", flashvars, params, attributes);
   }
   
});
