		$(document).ready(function(){
			$("#textExample").verticaltabs({speed: 500,slideShow: false,activeIndex: 0});
			$("#imageExample").verticaltabs({speed: 1000,slideShow: true,slideShowSpeed: 3000,activeIndex: 0,playPausePos: "topRight"});


  
    var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
    po.src = 'https://apis.google.com/js/plusone.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
  


		});

	var carousel;
	
	$(document).ready(function(){
		carousel = $('#carousel').carousel({
			width: 520,
			height: 269,
			itemWidth:180,
			horizontalRadius:200,
			verticalRadius:20,
			resize:false,
			scaleRatio:0.2,
			autoScroll:false,
			itemSelect:onItemSelect,
			itemClick: onItemClick,
			itemMouseOver: onItemSelect
		});
	});
	
	
	function toggleAutoScroll() {
		if (carousel.settings.autoScroll) {
			carousel.stopAutoScroll();
			$('#controls #auto-scroll').css('background-position', '-38px 0px');
		} else {
			carousel.startAutoScroll();
			$('#controls #auto-scroll').css('background-position', '0px 0px');
		}
	}
	
	
	function nextItem() {
		carousel.scrollToNext();
	}
	
	
	function previousItem() {
		carousel.scrollToPrevious();
	}
	
	
	function onItemSelect(event) {
		//$('#text #selected-title').html(event.data.title);
		//$('#text #selected-description').html(event.data.description);
	}

	function onItemClick(event) {
		//$('#text #selected-title').html(event.data.title);
		//$('#text #selected-description').html(event.data.description);

		var path = event.data.path;
		var pathAssoc = {
			"images/01_1.png": "#tab_restaurants",
			"images/01_2.png": "#tab_hotels",
			"images/01_3.png": "#tab_beauty",
			"images/01_4.png": "#tab_retailers",
			"images/01_5.png": "#tab_garages",
			"images/01_6.png": "#tab_florist",
			"images/01_7.png": "#tab_more"
		};

		var tab = pathAssoc[path];
		$(tab).click();
	}


	   $(document).ready(
				function(){
					$('#news').innerfade({
						animationtype: 'slide',
						speed: 750,
						timeout: 2000,
						type: 'random',
						containerheight: '1em'
					});
					
					$('ul#portfolio').innerfade({
						speed: 1000,
						timeout: 5000,
						type: 'sequence',
						containerheight: '20px',
						animationtype: 'slide'
						
						
					});
					
					$('.fade').innerfade({
						speed: 1000,
						timeout: 6000,
						type: 'random_start',
						containerheight: '1.5em'
					});
					
					$('.adi').innerfade({
						speed: 'slow',
						timeout: 5000,
						type: 'random',
						containerheight: '50px'
					});

			});


        $(function() {
            $("#slideshow_text").slideshow({
                slideshow_transition_effect: 'fade_in',//slide_left slide_down fade_in
                slideshow_time_interval: '4000',
                slideshow_window_width: '550',
                slideshow_window_height: '150',
                slideshow_border_style: 'none',//dashed dotted double groove hidden inset none outset ridge solid
                slideshow_border_size: '0',
                slideshow_border_color: 'none',
                slideshow_border_radius: '5',
                slideshow_padding_size: '10',
                soldeshow_background_color: 'none'
            });
        });

        $(function() {
            $("#slideshow_img").slideshow({
                slideshow_transition_effect: 'slide_left',//slide_left slide_down fade_in
                slideshow_time_interval: '4000',
                slideshow_window_width: '220',
                slideshow_window_height: '70',
                slideshow_border_style: 'none',//dashed dotted double groove hidden inset none outset ridge solid
                slideshow_border_size: '0',
                slideshow_border_color: 'none',
                slideshow_border_radius: '5',
                slideshow_padding_size: '5',
                soldeshow_background_color: 'none'
            });
        });

