$(document).ready(function() {
	
	// removing social from the FD
	$('.home iframe').remove();
	
	$('h3.slidecontrol').click(function(){
		var $this = $(this);
		var divID = $this.attr("id").replace("slidecontrol_", "slidedisplay_");
		var $div = $('#'+divID);
		if ($div.is(':visible')) {
			$div.slideUp(500);
		} else {
			$div.slideDown(500);
		}
		return false;
	});
	
	$.each(['li.page-item-104 a', 'li.page-item-116 a'], function(i, l){
	    var url = ($(l).attr('href'));
		$(l).attr('title', 'Click to learn more').parent().append('<ul class="children"><li class=""><a href="' + url + '" title="">Click here to learn more</a></li></ul>');
	 });
	
});

$(function(){ $("select").uniform(); });
$("select, input:checkbox, input:radio, input:file").uniform();

function FDhlPromo(title) {
	$('#homePromo h2').each(function () { 
	    $(this).html($(this).html().replace(title,'\<strong\>' + title + '\</strong\>'));
	});
}

function getUrlVars()
{
    var vars = [], hash;
    var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
    for(var i = 0; i < hashes.length; i++)
    {
        hash = hashes[i].split('=');
        vars.push(hash[0]);
        vars[hash[0]] = hash[1];
    }
    return vars;
}


