// JavaScript Document
$(document).ready(function(){
	$(".Events").fancybox({
		 'width' : 800,
		 'height' : 400,
		 'autoScale' : false,
		 'transitionIn' : 'none',
		 'transitionOut' : 'none',
		 'type' : 'iframe'
	 });

	 });
$(document).ready(function() {
	$("a.grouped_elements").fancybox({
		'transitionIn'	:	'elastic',
		'transitionOut'	:	'elastic',
		'overlayColor'  : '#000',
		'speedIn'		:	600, 
		'speedOut'		:	200, 
		'overlayShow'	:	true,
		'titlePosition' 	: 'over',
		'titleFormat'       : function(title, currentArray, currentIndex, currentOpts) {
		    return '<span id="fancybox-title-over">' + title + '</span>';
		}
	});
	
});
 $(document).ready(function() {
	$("#youtube").click(function() {
    	$.fancybox({
			'padding'        : 0,
			'autoScale'      : false,
			'transitionIn'   : 'none',
			'transitionOut'  : 'none',
			'overlayColor'  : '#000',
			'width'          : 680,
			'height'         : 495,
			'href'           : this.href.replace(new RegExp("watch\\?v=", "i"), 'v/'),
			'type'           : 'swf',
			'swf'            : {
				'wmode'              : 'transparent',
				'allowfullscreen'    : 'true'
			}
		});
	return false;
	});
});
$(document).ready(function(){
	$(".Terms").fancybox({
		 'width' : 700,
		 'height' : 400,
		 'autoScale' : false,
		 'overlayColor'     : '#000',
		 'transitionIn' : 'none',
		 'transitionOut' : 'none',
		 'type' : 'iframe'
	 });

	 });
$(document).ready(function(){
	$(".SMS").fancybox({
		 'width' : 850,
		 'height' : 300,
		 'autoScale' : false,
		 'overlayColor'     : '#000',
		 'transitionIn' : 'none',
		 'padding' : 2,
		 'transitionOut' : 'none',
		 'type' : 'iframe'
	 });
});
$(document).ready(function(){
	$(".adminBox").fancybox({
		 'width' : 500,
		 'height' : 440,
		 'autoScale' : false,
 		 'transitionIn'		: 'fade',
 		 'speedIn'			:	0, 
 		 'speedOut'			:	0, 
  		 'showNavArrows'	: false,
		 'transitionOut'	: 'fade',
		 'type'				: 'iframe',
		 'overlayColor'     : '#000',
		 'overlayOpacity'   : 0.8,
		 'onClosed': function() {
  			  parent.location.reload(true); ;
			}
	 });

	 });
$(document).ready(function(){
	$(".galleryBox").fancybox({
		 'width' : 500,
		 'height' : 440,
		 'autoScale' : false,
 		 'transitionIn'		: 'fade',
 		 'speedIn'			:	0, 
 		 'speedOut'			:	0, 
  		 'showNavArrows'	: false,
		 'transitionOut'	: 'fade',
		 'type'				: 'iframe',
		 'overlayColor'     : '#000',
		 'overlayOpacity'   : 0.8,
		 'onCleanup': function() {
			 return window.confirm('Closing the window if the query has not completed could result in galleries becoming corrupt. \n\nAre you sure you want to continue?'); ;
		 },
		 'onClosed': function() {
  			  parent.location.reload(true); ;
			}
	 });

	 });
$(document).ready(function(){
	$(".Contact").fancybox({
		 'width' : 473,
		 'height' : 515,
		 'autoScale' : false,
		 'transitionIn' : 'none',
		 'transitionOut' : 'none',
		 'type' : 'iframe'
	 });

	 });

  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-17902432-1']);
  _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);
  })();
