 $(document).ready(function(){
		
	$("#search_filter").hide();	
	
	
	
	$(".prev").hide();
	$(".next").hide();

	$("#flowpanes").mouseover(function() {
		$(".prev").show();
		$(".next").show();
	});
	
	$("#flowpanes").mouseout(function() {
		$(".prev").hide();
		$(".next").hide();
	});
	
   $(".scrollable").scrollable().circular();
  
   $("#flowpanes").scrollable({size: 1, clickable: false}).autoscroll(15000,{autoplay: true, autopause:true}).circular().navigator({ 
        navi: "#flowtabs", 
        naviItem: 'a', 
        activeClass: 'current' 
    }); 
	
    $("#flowpanes_main_content").scrollable({size: 1, clickable: false}).circular().navigator({ 
        navi: "#flowtabs", 
        naviItem: 'a', 
        activeClass: 'current' 
    }); 
		
		
	$('#tab_video').click(function() {
	  $('#photo').fadeOut();
	  $('#video').fadeIn();
	});
	
	$('#tab_photo').click(function() {
	  $('#video').fadeIn();
		$('#photo').fadeIn();
	});	
		
	$(".filter_results").click(function (event) {
		event.preventDefault();
		$("#search_filter").slideToggle();
	});
	
	$(".info_link").click(function (event) {
		event.preventDefault();
		$("#info_panel").slideToggle();
	});	
		
	$(".heart").click(function (event) {
		event.preventDefault();
		var guide_id = $(this).attr('id');		
		$.ajax({
			type: 'GET',
			url: '/ajax/call_vote.php',
			data: 'id=' + guide_id,
			dataType: 'html',
			success: function(response) {
				$('#ajaxVote').html(response);
			}
		});
	});		
	
	
	$('.place_vote').click(function (event) {
		event.preventDefault();
		var guide_id = $(this).attr('id');		
		var selector_class = '.ajaxVote_' + guide_id;
		
		$(this).qtip("hide");
		
		$.ajax({
			type: 'GET',
			url: '/ajax/ajax-vote.php',
			data: 'id=' + guide_id,
			dataType: 'html',
			success: function(response) {
				$(selector_class).html(response);
		
			}
		});
	});
	
	
	$('.list_place_vote').click(function (event) {
		event.preventDefault();
		var guide_id = $(this).attr('id');		
		var selector_class = '.ajaxVote_' + guide_id;
				
		$(this).qtip("hide");
		
		$.ajax({
			type: 'GET',
			url: '/ajax/list-ajax-vote.php',
			data: 'id=' + guide_id,
			dataType: 'html',
			success: function(response) {
				$(selector_class).html(response);
		
			}
		});
	});	
	
 });
 
 
 
 
function closeFancyBox(){
    parent.location.reload();
}
 
$(document).ready(function() {
	$(".iframe").fancybox({
		'width'				: 347,
		'height'			: 496,
        'autoScale'     	: true,
        'transitionIn'		: 'fade',
		'transitionOut'		: 'fade',
		'overlayOpacity'	:  '0.3',
		'type'				: 'iframe'
	});
	
	$(".iframe-newsletter").fancybox({
		'width'				: 347,
		'height'			: 383,
        'autoScale'     	: true,
        'transitionIn'		: 'fade',
		'transitionOut'		: 'fade',
		'overlayOpacity'	:  '0.3',
		'type'				: 'iframe'
	});
	
	
	$(".iframe-contact").fancybox({
		'width'				: 347,
		'height'			: 490,
        'autoScale'     	: true,
        'transitionIn'		: 'fade',
		'transitionOut'		: 'fade',
		'overlayOpacity'	:  '0.3',
		'type'				: 'iframe'
	});
	
	$(".iframe_login").fancybox({
		'width'				: 349,
		'height'			: 457,
		'padding'			: 0,
		'autoDimensions'	: true,
        'autoScale'     	: true,
        'transitionIn'		: 'fade',
		'transitionOut'		: 'fade',
		'overlayOpacity'	:  '0.3',
		'type'				: 'iframe',
		onClosed			: closeFancyBox
	});
	
	$(".iframe_vote").fancybox({
		'width'				: 349,
		'height'			: 90,
		'padding'			: 0,
		'autoDimensions'	: true,
        'autoScale'     	: true,
        'transitionIn'		: 'fade',
		'transitionOut'		: 'fade',
		'overlayOpacity'	:  '0.3',
		'type'				: 'iframe',
		onClosed			: closeFancyBox
	});
	
		
	
		
}); 

$(document).ready(function() {
	$('.iframe_login').qtip({ 
		content: 'Show this guide some love',
		position: {corner: {target: 'topMiddle',tooltip: 'bottomMiddle'}},
      	style: {
                  border: {
                     width: 5,
                     radius: 10,
					 color: '#393939'
                  },
                  padding: 10,
                  textAlign: 'center',
                  tip: true, // Give it a speech bubble tip with automatic corner detection
				  color: '#fff',
				  background:'#393939',
               },
		adjust:{
			y:-100
		}
	});
	
	
	$('.place_vote').qtip({ 
		content: 'Show this guide some love',
		position: {corner: {target: 'topMiddle',tooltip: 'bottomMiddle'}},
      	style: {
                  border: {
                     width: 5,
                     radius: 10,
					 color: '#393939'
                  },
                  padding: 10, 
                  textAlign: 'center',
                  tip: true, // Give it a speech bubble tip with automatic corner detection
				  color: '#393939'
               },
		tip: {color: '#393939'}
	});
		
	
});


	