$(document).ready(function() {

$('input, textarea').placeholder();
	
// VALIDATION
$("form#form-id").validate();

// SLIDESHOWS


$("#slides").cycle({
	speed: 500,
	timeout: 15000,
	pause: true,
	next: '#next',
	prev: '#prev',
	cleartypeNoBg:true
});
	
$(".callout p:last").css('margin','0');	
	
// DROPDOWN
$('#nav li').hover(
	function () {
		$(this).children('a:first').addClass("active");	
		$('ul', this).stop(true,true).slideDown(200);
	}, 
	function () {
		$(this).find('a').removeClass("active");
		$('ul', this).stop(true,true).slideUp(100);			
	}
);
	
$(".simple-table tr:last-child").css('border','none');	
	
// 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");
	
	
// STYLE LINKS
$("a[href$='.pdf']").addClass("pdf");
$("a[href$='.zip'], a[href$='.rar']").addClass("zip"); 
$("a[href^='mailto:']").addClass("email");
$('a').filter(function() {
    return this.hostname && this.hostname !== location.hostname;
}).addClass("external").attr("target", "_blank");




});
 
  
