$(document).ready(function () {
		
/*Anything slider*/

//Slider 1
$('#slider1').anythingSlider({
	startStopped    : true, // If autoPlay is on, this can force it to start stopped
	width           : 910,   // Override the default CSS width
	easing          : 'easeInOutBack',
//				autoPlayLocked  : true,  // If true, user changing slides will not stop the slideshow
//				resumeDelay     : 10000, // Resume slideshow after user interaction, only if autoplayLocked is true (in milliseconds).
	onSlideComplete : function(slider){
			// alert('Welcome to Slide #' + slider.currentPage);
		},
		navigationFormatter : function(index, panel){return "";  },
		stopAtEnd : true,
		onShowStop : function(e, slider){
			setTimeout(function(){
				if (slider.currentPage === slider.pages) { slider.gotoPage(1); }
			}, 5000);
		}
	});
	
//Slider 2
$('#slider2').anythingSlider({
	startStopped    : false, // If autoPlay is on, this can force it to start stopped
	autoPlay		: true,
	buildArrows		: true,
	width           : 910,   // Override the default CSS width
	height			: 350,
	easing          : 'easeInOutBack',
//				autoPlayLocked  : true,  // If true, user changing slides will not stop the slideshow
//				resumeDelay     : 10000, // Resume slideshow after user interaction, only if autoplayLocked is true (in milliseconds).
		onSlideComplete : function(slider){
			// alert('Welcome to Slide #' + slider.currentPage);
		},
		navigationFormatter : function(index, panel){return "";  },
		stopAtEnd : true,
		onShowStop : function(e, slider){
			setTimeout(function(){
				if (slider.currentPage === slider.pages) { slider.gotoPage(1); }
			}, 5000);
		}
	});

/*Fancybox*/
$("a[rel=example_group]").fancybox({
	'transitionIn'		: 'none',
	'transitionOut'		: 'none',
	'titlePosition' 	: 'over',
	'titleFormat'		: function(title, currentArray, currentIndex, currentOpts) {
		return '<span id="fancybox-title-over">Image ' + (currentIndex + 1) + ' / ' + currentArray.length + (title.length ? ' &nbsp; ' + title : '') + '</span>';
	}
});

/*Awkward */

$("#showcase").awShowcase({
	content_width:			600,
	content_height:			333,
	hundred_percent:		false,
	auto:					false,
	interval:				3000,
	continuous:				false,
	loading:				true,
	tooltip_width:			200,
	tooltip_icon_width:		32,
	tooltip_icon_height:	32,
	tooltip_offsetx:		18,
	tooltip_offsety:		0,
	arrows:					false,
	buttons:				false,
	btn_numbers:			true,
	keybord_keys:			true,
	mousetrace:				false,
	pauseonover:			true,
	transition:				'hslide', /* hslide/vslide/fade */
	transition_delay:		300,
	transition_speed:		500,
	show_caption:			false, /* onload/onhover/show */
	thumbnails:				true,
	thumbnails_position:	'outside-last', /* outside-last/outside-first/inside-last/inside-first */
	thumbnails_direction:	'horizontal', /* vertical/horizontal */
	thumbnails_slidex:		0, /* 0 = auto / 1 = slide one thumbnail / 2 = slide two thumbnails / etc. */
	dynamic_height:			false,
	speed_change:			true,
	viewline:				false
});

/*Mosaic*/
$('.circle').mosaic({
	opacity		:	0.8			//Opacity for overlay (0-1)
});

$('.cover2').mosaic({
	animation	:	'slide',	//fade or slide
	anchor_y	:	'bottom',		//Vertical anchor position
	hover_y		:	'100px'		//Vertical position on hover
});

$('.cover3').mosaic({
	animation	:	'slide',	//fade or slide
	anchor_y	:	'top',		//Vertical anchor position
	hover_y		:	'100px'		//Vertical position on hover
});

/*Nivo Slider*/
$('#slider').nivoSlider({
	controlNavThumbs:true,
	effect:'fade' // Specify sets like: 'fold,fade,sliceDown'
});

/*Analytics*/
  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-2134014-13']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();



});//End Document Ready
