// remap jQuery to $
(function($){})(window.jQuery);


/* trigger when page is ready */
$(document).ready(function (){


	// Placeholder support for ie
	if(!Modernizr.input.placeholder){
	
		$('[placeholder]').focus(function() {
		  var input = $(this);
		  if (input.val() == input.attr('placeholder')) {
			input.val('');
			input.removeClass('placeholder');
		  }
		}).blur(function() {
		  var input = $(this);
		  if (input.val() == '' || input.val() == input.attr('placeholder')) {
			input.addClass('placeholder');
			input.val(input.attr('placeholder'));
		  }
		}).blur();
		$('[placeholder]').parents('form').submit(function() {
		  $(this).find('[placeholder]').each(function() {
			var input = $(this);
			if (input.val() == input.attr('placeholder')) {
			  input.val('');
			}
		  })
		});
	
	}
	
	// Cycle gallery
	$('#slideshow_top').cycle({ 
		fx:    'fade', 
		speed:  3000,
		timeout: 10000,
		
		fit: true,
		slideResize: 0,
		height: 'auto',
		containerResize: 1,
		
        prev:    '.slidenav span.previous a',
        next:    '.slidenav span.next a'/*,
		delay: 2500,
		width:	'940',
		next:   '.next', 
		prev:   '.previous',
		nowrap: 1,
		autostop: 1,
		autostopCount: 1,*/
	});
	$('#slideshow').cycle({ 
		fx:    'fade', 
		speed:  3000,
		timeout: 10000,
		
		fit: true,
		slideResize: 0,
		height: 'auto',
		containerResize: 1,
		
        prev:    '.slidenav span.previous a',
        next:    '.slidenav span.next a'
	});
	
	// Hide the address bar!
	// When ready...
	window.addEventListener("load",function() {
	// Set a timeout...
	setTimeout(function(){
	// Hide the address bar!
	window.scrollTo(0, 1);
	}, 0);
	});



});

/* optional triggers

$(window).load(function() {
	
});

$(window).resize(function() {
	
});

*/
