/*
      ___           ___           ___                       ___                    ___           ___           ___           ___           ___           ___           ___           ___           ___           ___
     /\  \         /\  \         /\  \          ___        /\__\                  /\__\         /\  \         /\__\         /\  \         /\  \         /\  \         /\__\         /\__\         /\  \         /\__\
    /::\  \       /::\  \       /::\  \        /\  \      /::|  |                /:/  /        /::\  \       /::|  |       /::\  \       /::\  \       /::\  \       /:/  /        /:/ _/_       /::\  \       /::|  |
   /:/\:\  \     /:/\:\  \     /:/\:\  \       \:\  \    /:|:|  |               /:/  /        /:/\:\  \     /:|:|  |      /:/\ \  \     /:/\:\  \     /:/\:\  \     /:/  /        /:/ /\__\     /:/\:\  \     /:|:|  |
  /::\~\:\  \   /:/  \:\  \   /::\~\:\__\      /::\__\  /:/|:|  |__            /:/__/  ___   /::\~\:\  \   /:/|:|  |__   _\:\~\ \  \   /::\~\:\  \   /::\~\:\  \   /:/  /  ___   /:/ /:/ _/_   /::\~\:\  \   /:/|:|  |__
 /:/\:\ \:\__\ /:/__/ \:\__\ /:/\:\ \:|__|  __/:/\/__/ /:/ |:| /\__\           |:|  | /\__\ /:/\:\ \:\__\ /:/ |:| /\__\ /\ \:\ \ \__\ /:/\:\ \:\__\ /:/\:\ \:\__\ /:/__/  /\__\ /:/_/:/ /\__\ /:/\:\ \:\__\ /:/ |:| /\__\
 \/_|::\/:/  / \:\  \ /:/  / \:\~\:\/:/  / /\/:/  /    \/__|:|/:/  /           |:|  |/:/  / \/__\:\/:/  / \/__|:|/:/  / \:\ \:\ \/__/ \/__\:\/:/  / \/__\:\/:/  / \:\  \ /:/  / \:\/:/ /:/  / \:\~\:\ \/__/ \/__|:|/:/  /
    |:|::/  /   \:\  /:/  /   \:\ \::/  /  \::/__/         |:/:/  /            |:|__/:/  /       \::/  /      |:/:/  /   \:\ \:\__\        \::/  /       \::/  /   \:\  /:/  /   \::/_/:/  /   \:\ \:\__\       |:/:/  /
    |:|\/__/     \:\/:/  /     \:\/:/  /    \:\__\         |::/  /              \::::/__/        /:/  /       |::/  /     \:\/:/  /         \/__/        /:/  /     \:\/:/  /     \:\/:/  /     \:\ \/__/       |::/  /
    |:|  |        \::/  /       \::/__/      \/__/         /:/  /                ~~~~           /:/  /        /:/  /       \::/  /                      /:/  /       \::/  /       \::/  /       \:\__\         /:/  /
     \|__|         \/__/         ~~                        \/__/                                \/__/         \/__/         \/__/                       \/__/         \/__/         \/__/         \/__/         \/__/

*/
$(document).ready(function()
{
    $('#slideshow').cycle({
        fx: 'scrollLeft',
        timeout: 5000,
        before: onBefore,
        after: onAfter,
        next: '#slideshow'
        });
    function onBefore()
    {
        $('#ticker').fadeOut("slow");
    }
    function onAfter()
    {
        $('#ticker').html(this.alt);
        $('#ticker').fadeIn("slow");
    }
    
    $('#footer p').slideDown("slow");

    $('a[title]').qtip({    style: {name: 'dark', font: '10px "Trebuchet MS", Helvetica, sans-serif'},
                            position: {corner: {target: 'topRight', tooltip: 'bottomLeft'}}
                        });

    $("a.thumb").fancybox({
	'speedIn'       : 600,
        'speedOut'      : 200,
        'overlayShow'	: false,
        'titlePosition'	: 'over',
	'onComplete'	: function() {  $("#fancybox-wrap").hover(function() {
                                        $("#fancybox-title").show();},function() {
                                        $("#fancybox-title").hide();});}
                            });

    $("ul.gallery li").hover(function() {
        $(this).css({'z-index' : '10'});
        $(this).find('img').addClass("hover").stop()
		.animate({
			marginTop: '-110px',
			marginLeft: '-110px',
			top: '50%',
			left: '50%',
			width: '174px',
			height: '174px',
			padding: '20px'
		}, 200);
	} , function() {
	$(this).css({'z-index' : '0'});
	$(this).find('img').removeClass("hover").stop()
		.animate({
			marginTop: '0',
			marginLeft: '0',
			top: '0',
			left: '0',
			width: '100px',
			height: '100px',
			padding: '5px'
		}, 400);
    });
});
