/* jQuery Reveal Plugin 1.0 www.ZURB.com Copyright 2010, ZURB MIT License */
(function(c){c("a[data-reveal-id]").live("click",function(d){d.preventDefault();d=c(this).attr("data-reveal-id");c("#"+d).reveal(c(this).data())});c.fn.reveal=function(d){var a=c.extend({},{position:"centered",animation:"fade",animationspeed:300,closeonbackgroundclick:!0,dismissmodalclass:"close-reveal-modal"},d);return this.each(function(){function d(){g=!1}var b=c(this),g=!1,e=c(".reveal-modal-bg");if("centered"==a.position){var i=Math.round((jQuery(window).height()-b.height())/2),j=Math.round((jQuery(window).width()-
b.width())/2);b.css({top:i+"px",left:j+"px"})}else var f=parseInt(b.css("top"),10),h=b.height()+f;0===e.length&&(e=c('<div class="reveal-modal-bg" />').insertAfter(b));b.bind("reveal:open",function(){e.unbind("click.modalEvent");c("."+a.dismissmodalclass).unbind("click.modalEvent");g||(g=!0,"fadeAndPop"==a.animation?(b.css({top:c(document).scrollTop()-h,opacity:0,visibility:"visible"}),e.fadeIn(a.animationspeed/2),b.delay(a.animationspeed/2).animate({top:c(document).scrollTop()+f+"px",opacity:1},
a.animationspeed,d())):"fade"==a.animation?(b.css({opacity:0,visibility:"visible",top:c(document).scrollTop()+f}),e.fadeIn(a.animationspeed/2),b.delay(a.animationspeed/2).animate({opacity:1},a.animationspeed,d())):"none"==a.animation&&(b.css({visibility:"visible",top:c(document).scrollTop()+f}),e.css({display:"block"}),d()));b.unbind("reveal:open")});b.bind("reveal:close",function(){g||(g=!0,"fadeAndPop"==a.animation?(e.delay(a.animationspeed).fadeOut(a.animationspeed),b.animate({top:c(document).scrollTop()-
h+"px",opacity:0},a.animationspeed/2,function(){b.css({top:f,opacity:1,visibility:"hidden"});d()})):"fade"==a.animation?(e.delay(a.animationspeed).fadeOut(a.animationspeed),b.animate({opacity:0},a.animationspeed,function(){b.css({opacity:1,visibility:"hidden",top:f});d()})):"none"==a.animation&&(b.css({visibility:"hidden",top:f}),e.css({display:"none"})));b.unbind("reveal:close")});b.trigger("reveal:open");c("."+a.dismissmodalclass).bind("click.modalEvent",function(){b.trigger("reveal:close")});a.closeonbackgroundclick&&
(e.css({cursor:"pointer"}),e.bind("click.modalEvent",function(){b.trigger("reveal:close")}));c("body").keyup(function(a){27===a.which&&b.trigger("reveal:close")})})}})(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));
