/**
 * Callbacks
 */
function homeCarouselChange(event, ui)
{
    jQuery('#home_feature_content h2').html(jQuery('#home_carousel .carousel_items li').eq(ui.currentPage).find('h2').html());
}

/* jQuery Reveal Plugin 1.0 www.ZURB.com Copyright 2010, ZURB MIT License */
(function($){$("a[data-reveal-id]").live("click",function(e){e.preventDefault();var modalLocation=$(this).attr("data-reveal-id");$("#"+modalLocation).reveal($(this).data())});$.fn.reveal=function(custom){var defaults={position:"centered",animation:"fadeAndPop",animationspeed:300,closeonbackgroundclick:true,dismissmodalclass:"close-reveal-modal"};var options=$.extend({},defaults,custom);return this.each(function(){var modal=$(this),locked=false,modalBG=$(".reveal-modal-bg");if(options.position=="centered"){var verticalCenter=
Math.round((jQuery(window).height()-modal.height())/2)+"px",horizontalCenter=Math.round((jQuery(window).width()-modal.width())/2)+"px";modal.css({"top":verticalCenter,"left":horizontalCenter})}var topMeasure=parseInt(modal.css("top"),10),topOffset=modal.height()+topMeasure;if(modalBG.length===0)modalBG=$('<div class="reveal-modal-bg" />').insertAfter(modal);modal.bind("reveal:open",function(){modalBG.unbind("click.modalEvent");$("."+options.dismissmodalclass).unbind("click.modalEvent");if(!locked){lockModal();
if(options.animation=="fadeAndPop"){modal.css({"top":$(document).scrollTop()-topOffset,"opacity":0,"visibility":"visible"});modalBG.fadeIn(options.animationspeed/2);modal.delay(options.animationspeed/2).animate({"top":$(document).scrollTop()+topMeasure+"px","opacity":1},options.animationspeed,unlockModal())}else if(options.animation=="fade"){modal.css({"opacity":0,"visibility":"visible","top":$(document).scrollTop()+topMeasure});modalBG.fadeIn(options.animationspeed/2);modal.delay(options.animationspeed/
2).animate({"opacity":1},options.animationspeed,unlockModal())}else if(options.animation=="none"){modal.css({"visibility":"visible","top":$(document).scrollTop()+topMeasure});modalBG.css({"display":"block"});unlockModal()}}modal.unbind("reveal:open")});modal.bind("reveal:close",function(){if(!locked){lockModal();if(options.animation=="fadeAndPop"){modalBG.delay(options.animationspeed).fadeOut(options.animationspeed);modal.animate({"top":$(document).scrollTop()-topOffset+"px","opacity":0},options.animationspeed/
2,function(){modal.css({"top":topMeasure,"opacity":1,"visibility":"hidden"});unlockModal()})}else if(options.animation=="fade"){modalBG.delay(options.animationspeed).fadeOut(options.animationspeed);modal.animate({"opacity":0},options.animationspeed,function(){modal.css({"opacity":1,"visibility":"hidden","top":topMeasure});unlockModal()})}else if(options.animation=="none"){modal.css({"visibility":"hidden","top":topMeasure});modalBG.css({"display":"none"})}}modal.unbind("reveal:close")});modal.trigger("reveal:open");
var closeButton=$("."+options.dismissmodalclass).bind("click.modalEvent",function(){modal.trigger("reveal:close")});if(options.closeonbackgroundclick){modalBG.css({"cursor":"pointer"});modalBG.bind("click.modalEvent",function(){modal.trigger("reveal:close")})}$("body").keyup(function(e){if(e.which===27)modal.trigger("reveal:close")});function unlockModal(){locked=false}function lockModal(){locked=true}})}})(jQuery);

/* jQuery Cookie plugin Copyright (c) 2010 Klaus Hartl (stilbuero.de) MIT and GPL License */
jQuery.cookie=function(key,value,options){if(arguments.length>1&&String(value)!=="[object Object]"){options=jQuery.extend({},options);if(value===null||value===undefined)options.expires=-1;if(typeof options.expires==="number"){var days=options.expires,t=options.expires=new Date;t.setDate(t.getDate()+days)}value=String(value);return document.cookie=[encodeURIComponent(key),"=",options.raw?value:encodeURIComponent(value),options.expires?"; expires="+options.expires.toUTCString():"",options.path?"; path="+
options.path:"",options.domain?"; domain="+options.domain:"",options.secure?"; secure":""].join("")}options=value||{};var result,decode=options.raw?function(s){return s}:decodeURIComponent;return(result=(new RegExp("(?:^|; )"+encodeURIComponent(key)+"=([^;]*)")).exec(document.cookie))?decode(result[1]):null};

/*! http://mths.be/placeholder v1.8.5 by @mathias */
(function(g,a,$){var f='placeholder' in a.createElement('input'),b='placeholder' in a.createElement('textarea');if(f&&b){$.fn.placeholder=function(){return this};$.fn.placeholder.input=$.fn.placeholder.textarea=true}else{$.fn.placeholder=function(){return this.filter((f?'textarea':':input')+'[placeholder]').bind('focus.placeholder',c).bind('blur.placeholder',e).trigger('blur.placeholder').end()};$.fn.placeholder.input=f;$.fn.placeholder.textarea=b;$(function(){$('form').bind('submit.placeholder',function(){var h=$('.placeholder',this).each(c);setTimeout(function(){h.each(e)},10)})});$(g).bind('unload.placeholder',function(){$('.placeholder').val('')})}function d(i){var h={},j=/^jQuery\d+$/;$.each(i.attributes,function(l,k){if(k.specified&&!j.test(k.name)){h[k.name]=k.value}});return h}function c(){var h=$(this);if(h.val()===h.attr('placeholder')&&h.hasClass('placeholder')){if(h.data('placeholder-password')){h.hide().next().show().focus().attr('id',h.removeAttr('id').data('placeholder-id'))}else{h.val('').removeClass('placeholder')}}}function e(){var l,k=$(this),h=k,j=this.id;if(k.val()===''){if(k.is(':password')){if(!k.data('placeholder-textinput')){try{l=k.clone().attr({type:'text'})}catch(i){l=$('<input>').attr($.extend(d(this),{type:'text'}))}l.removeAttr('name').data('placeholder-password',true).data('placeholder-id',j).bind('focus.placeholder',c);k.data('placeholder-textinput',l).data('placeholder-id',j).before(l)}k=k.removeAttr('id').hide().prev().attr('id',j).show()}k.addClass('placeholder').val(k.attr('placeholder'))}else{k.removeClass('placeholder')}}}(this,document,jQuery));
