$(document).ready(function (){							

<!-- Set slide h2 based upon corresponding nav h2 -->
/*var titles = $('#nav').find("h2").map(function() { return $(this).text(); });
var x = 0;
for (var key in titles) {
   $('#slide-' + (x + 1)).find('h2').html(titles[x]);
   ++x;
}*/

<!-- slideShow Slider -->
$('#slides').cycle({ 
    fx:'fade',
    pager:'#nav',
    cleartype: true,
    cleartypeNoBg: true,
    timeout: 8000,
    speed: 700,
    updateActivePagerLink: function(pager, currSlideIndex) {
        $(pager).find('a').removeClass('active').filter('a:eq('+currSlideIndex+')').addClass('active');
    }
});

<!-- Navigate to selected slide on click -->
$('#slideNav-1 a').click(function() { 
    $('#slides').cycle(0); 
    return false; 
});
$('#slideNav-2 a').click(function() { 
    $('#slides').cycle(1); 
    return false; 
});
$('#slideNav-3 a').click(function() { 
    $('#slides').cycle(2); 
    return false; 
});
$('#slideNav-4 a').click(function() { 
    $('#slides').cycle(3); 
    return false; 
});

<!-- Pause on Hover -->
$("#slides").hover(function (){
    $('#slides').cycle('pause'); 
},function (){
    $('#slides').cycle('resume'); 
});

$(window).resize(function (){
    resize();
});

<!-- Slide Labels + Focus Inputs -->
$("#subForm p input").val("");
swapValue = [];
$("#subForm p input, #subForm p label").each(function(i){
swapValue[i] = $(this).val();
$(this).focus(function(){
if ($(this).val() == swapValue[i]) {
$(this).val("");
}
$(this).addClass("focus");
$(this).parent().find("label").animate({"left":"-200px"});
}).blur(function(){
if ($.trim($(this).val()) == "") {
$(this).val(swapValue[i]);
$(this).removeClass("focus");
$(this).parent().find("label").animate({"left":"0px"});
}
});
});

<!-- Newsletter Dropdown Controls -->
$(".trigger").click(function (){
$("#subForm").slideToggle();
});

$("#close").click(function (){
$("#subForm").slideUp();
});



});
