jQuery(function() { jQuery("#nav").lavaLamp({ fx: "backout", speed: 800, click: function(event, menuItem){return true;}});});

jQuery(document).ready(function() {
jQuery("#steps ul li, #steps-loc ul li, #designtop li, #target-national").click(function () {
var url = jQuery(this).find("a").attr('href');
window.location = url;
	});
	// landing page over state
	jQuery(".local-callout, .national-callout").mouseover(function(){
    jQuery(this).addClass("over");    
    }).mouseout(function(){
    jQuery(this).removeClass("over");
    });
});
// carouselle
jQuery(document).ready(function() {
    jQuery("#carouselle").jCarouselLite({
        btnNext: ".next",
        btnPrev: ".prev"
    });
	jQuery("#carouselle-front").jCarouselLite({
        btnNext: ".next",
        btnPrev: ".prev",
		auto: 5500,
		easing: "backout",
		speed: 1000,
		visible: 1

    });
});


jQuery(document).ready(function() {
jQuery("a[rel=gallery]").fancybox({
				'cyclic'			: 'true',
				'transitionIn'		: 'fade',
				'transitionOut'		: 'fade',
				'titlePosition' 	: 'over',
				'titleFormat'		: function(title, currentArray, currentIndex, currentOpts) {
					return '<span id="fancybox-title-over">Image ' + (currentIndex + 1) + ' / ' + currentArray.length + (title.length ? ' &nbsp; ' + title : '') + '</span>';
				}
			});
	jQuery("#modal, .modal").fancybox();
});

// main navigation on page top
/*
(function($) {
$.fn.lavaLamp = function(o) {
    o = $.extend({ fx: "linear", speed: 500, click: function(){} }, o || {});

    return this.each(function() {
        var me = $(this), noop = function(){},
            $back = $('<li class="back"><div class="left"></div></li>').appendTo(me),
            $li = $("li", this), curr = $("li.current", this)[0] || $($li[0]).addClass("current")[0];

        $li.not(".back").hover(function() {
            move(this);
        }, noop);

        $(this).hover(noop, function() {
            move(curr);
        });

        $li.click(function(e) {
            setCurr(this);
            return o.click.apply(this, [e, this]);
        });

        setCurr(curr);

        function setCurr(el) {
            $back.css({ "left": el.offsetLeft+"px", "width": el.offsetWidth+"px" });
            curr = el;
        };

        function move(el) {
            $back.each(function() {
                $.dequeue(this, "fx"); }
            ).animate({
                width: el.offsetWidth,
                left: el.offsetLeft
            }, o.speed, o.fx);
        };

    });
};
})(jQuery); */

jQuery.noConflict();
