

$(document).ready(function(){$.pwConfig=$.extend({},$.parseJSON($('#site_data #cfg_obj').text()));var baseurl=$.pwConfig.site.base_url;start_js_timer();$('.hover_off').hover(function(){$(this).addClass("hover_on").removeClass("hover_off");},function(){$(this).addClass("hover_off").removeClass("hover_on");});$('a.error.trace').live("click",function(e){e.preventDefault();var _this=$(this);_this.parent().next("ol.error").slideDown(600,function(){_this.text("back to homepage").unbind("click");});});$('button[type=submit]').each(function(){var _this=$(this);_this.addClass("title").prepend('<span class="icon icon-ok"></span>').after($('<button />').attr("type","reset").html('<span class="icon icon-error"></span>Reset').addClass("negative cnr-all").click(function(){$(this).parents("form").find(":input").val("")}));});$('button.create.panel').live("click",function(e){var _row=$(this).parents(".form.validate"),_params={page:"projects",view:"create_panel",ajax:true};$.get(baseurl+"/index.php",_params,function(d){_row.after(d);});});$('a.toggle.example').live("click",function(event){event.preventDefault();var _this=$(this),example=_this.parents(".surround").find(".example.hidden");if(example.is(":hidden")){example.show(0);_this.text("Hide Example");}else{example.hide(0);_this.text("Show Example");}});});