/* Custom Scripts */
$(document).ready(function () {

	// Start Parallax script
	$('.setupArea').parallax("50%", 0.1);

	// Start Main Content Slider
	$('#main-slider').flexslider({
		animation: "fade",
  	slideshowSpeed: 3000,
    pauseOnHover: false, 
		useCSS: false,
		touch: true,
		prevText: "<span class='fa fa-angle-left'></span>",
		nextText: "<span class='fa fa-angle-right'></span>",
	});
	
      $('.flexslider').flexslider({
        animation: "slide",
        animationLoop: false,
        itemWidth: 350,
        itemMargin: 0,
		prevText: "<span>&LT;</span>",
		nextText: "<span>&GT;</span>",
		controlNav: false,
        start: function(slider){
          $('body').removeClass('loading');
        }
      });

	// Start Header Animation
	$(window).scroll(function () {
		if ($(document).scrollTop() == 0) {
			$('.top-menu').removeClass('tiny');
		} else {
			$('.top-menu').addClass('tiny');
		}
	});

	// Start ToolTip
	$('[data-toggle=tooltip]').tooltip() 
	
	// Start PoPover
	$('[data-toggle=popover]').popover()
	
		// Start Google Map
	$('#map_canvas').gmap({
		'center': new google.maps.LatLng(41.1339,-73.94234), // Change this to your desired latitude and longitude
		'zoom': 17,
		'mapTypeControl': false,
		'navigationControl': false,
		'streetViewControl': false,
		'styles': [{
			stylers: [{
				gamma: 0.1
			}, {
				hue: "#4AD1E5"
			}, {
				invert_lightness: false
			}, {
				lightness: 2
			}, {
				saturation: -50
			}, {
				visibility: "on"
			}]
		}]
	});
	var image = {
		url: 'images/marker.png', // Define the map marker file here
		// This marker is 51 pixels wide by 63 pixels tall.
		size: new google.maps.Size(64, 64),
		// The origin for this image is 0,0.
		origin: new google.maps.Point(0, 0),
		// The anchor for this image is the base of the flagpole at 26,63.
		anchor: new google.maps.Point(26, 63)
	};
	$('#map_canvas').gmap().bind('init', function () {
		$('#map_canvas').gmap('addMarker', {
			'id': 'marker-1',
			'position': '41.1339,-73.94234',
			'bounds': false,
			'icon': image
		}).click(function () {
			$('#map_canvas').gmap('openInfoWindow', {
				'content': '<p><strong>Building</strong><br>8724 Middle Chase<br>Cut and Shoot<br>Vermont, 05442-0002, US</p>'
			}, this);
		});
	}); 

	// prettyPhoto script start here
    $('a[data-gal]').each(function() {
        $(this).attr('rel', $(this).data('gal'));
    });     
    $("a[data-rel^='prettyPhoto']").prettyPhoto({animationSpeed:'slow',theme:'light_square',slideshow:false,overlay_gallery: false,social_tools:false,deeplinking:false});

});	