$(document).ready(function() {
	
	// SLIDESHOWS
	
	
	 $('#slides').before('<div id="slider-nav">').cycle({ 
		fx:     'fade', 
		timeout: 6000,
		speed: 500, 
		pager:  '#slider-nav', 
        after:     function() {
            $('#caption').html(this.alt);
        }
    });

	$("a[rel^='prettyPhoto']").prettyPhoto();
	
	// INPUT HINT OVERLAY
	$("form#order1").inputHintOverlay(3, 3);
	
	// TOOLTIP
	$(".tip").tooltip();
	
	// VALIDATION
	$("form#form-id").validate();
	
	// PRELOAD CSS IMAGES
	$.preloadCssImages();

    // DROPDOWN
	$('#nav li').hover(
		function () {
			$(this).addClass("hover");
			$('ul', this).slideDown(200);
		}, 
		function () {
			$(this).removeClass("hover");
			$('ul', this).slideUp(100);			
		}
	);
	
	// EQUAL COL HEIGHT
	var max_height = 0;
	$("div.container").each(function(){
	if ($(this).height() > max_height) { max_height = $(this).height(); }
	});
	$("div.container").height(max_height);

	// CLICKABLE CONTAINER
	$('.container').click(function() {
        var href = $(this).find("a").attr("href");
        if(href) {
            window.location = href;
        }
    });
	
	// STIPED TABLES
	$("table.striped tr:odd").addClass("alt-row");
	

  });
