
$(function(){var googleCSEWatermark=function($id){var f=document.getElementById($id);if(f&&(f.query||f.q||f['edit-keys'])){var q=f.query?f.query:(f.q?f.q:f['edit-keys']);var n=navigator;var l=location;if(n.platform=='Win32'){q.style.cssText='border: 1px solid #7e9db9; padding: 2px;';}
var b=function(){if(q.value==''){q.style.background='#FFFFFF url(http://www.google.com/coop/intl/'+Drupal.settings.googleCSE.language+'/images/google_custom_search_watermark.gif) left no-repeat';}};var f=function(){q.style.background='#ffffff';};q.onfocus=f;q.onblur=b;if(!/[&?]query=[^&]/.test(l.search)){b();}}};googleCSEWatermark('google-cse-searchbox-form');googleCSEWatermark('google-cse-results-searchbox-form');if(Drupal.settings.googleCSE.searchForm){googleCSEWatermark('search-form');}});;Drupal.wysiwygInit=function(){if(/KDE/.test(navigator.vendor)){return;}
jQuery.each(Drupal.wysiwyg.editor.init,function(editor){this(jQuery.extend(true,{},Drupal.settings.wysiwyg.configs[editor]));});};Drupal.behaviors.attachWysiwyg=function(context){if(/KDE/.test(navigator.vendor)){return;}
$('.wysiwyg:not(.wysiwyg-processed)',context).each(function(){var params=Drupal.wysiwyg.getParams(this);var $this=$(this);if(($this.is(':input')&&$this.is(':checked'))||$this.is('div')){Drupal.wysiwygAttach(context,params);}
if($this.is(':input')){$this.change(function(){Drupal.wysiwygDetach(context,params);Drupal.wysiwygAttach(context,params);});if($.browser.msie){$this.click(function(){this.blur();});}}
$this.addClass('wysiwyg-processed');});};Drupal.wysiwygAttach=function(context,params){if(typeof Drupal.wysiwyg.editor.attach[params.editor]=='function'){Drupal.wysiwyg.instances[params.field]={};jQuery.extend(Drupal.wysiwyg.instances[params.field],params);if(typeof Drupal.wysiwyg.editor.instance[params.editor]=='object'){jQuery.extend(Drupal.wysiwyg.instances[params.field],Drupal.wysiwyg.editor.instance[params.editor]);}
Drupal.wysiwyg.activeId=params.field;if(params.toggle){Drupal.wysiwygAttachToggleLink(context,params);}
else{$('#wysiwyg-toggle-'+params.field).hide();}
if(params.status){Drupal.wysiwyg.editor.attach[params.editor](context,params,(Drupal.settings.wysiwyg.configs[params.editor]?jQuery.extend(true,{},Drupal.settings.wysiwyg.configs[params.editor][params.format]):{}));}
else{Drupal.wysiwyg.editor.attach.none(context,params);Drupal.wysiwyg.instances[params.field].editor='none';}}};Drupal.wysiwygDetach=function(context,params){var editor=Drupal.wysiwyg.instances[params.field].editor;if(jQuery.isFunction(Drupal.wysiwyg.editor.detach[editor])){Drupal.wysiwyg.editor.detach[editor](context,params);}};Drupal.wysiwygAttachToggleLink=function(context,params){if(!$('#wysiwyg-toggle-'+params.field).length){var text=document.createTextNode(params.status?Drupal.settings.wysiwyg.disable:Drupal.settings.wysiwyg.enable);var a=document.createElement('a');$(a).attr({id:'wysiwyg-toggle-'+params.field,href:'javascript:void(0);'}).append(text);var div=document.createElement('div');$(div).addClass('wysiwyg-toggle-wrapper').append(a);$('#'+params.field).after(div);}
$('#wysiwyg-toggle-'+params.field).html(params.status?Drupal.settings.wysiwyg.disable:Drupal.settings.wysiwyg.enable).show().unbind('click').click(function(){if(params.status){params.status=false;Drupal.wysiwygDetach(context,params);Drupal.wysiwyg.editor.attach.none(context,params);Drupal.wysiwyg.instances[params.field]=Drupal.wysiwyg.editor.instance.none;Drupal.wysiwyg.instances[params.field].editor='none';$(this).html(Drupal.settings.wysiwyg.enable).blur();}
else{Drupal.wysiwyg.editor.detach.none(context,params);Drupal.wysiwyg.getParams($('.wysiwyg-field-'+params.field+':checked, div.wysiwyg-field-'+params.field,context).get(0),params);params.status=true;Drupal.wysiwygAttach(context,params);$(this).html(Drupal.settings.wysiwyg.disable).blur();}});if(params.editor=='none'){$('#wysiwyg-toggle-'+params.field).hide();}};Drupal.wysiwyg.getParams=function(element,params){var classes=element.className.split(' ');var params=params||{};for(var i in classes){if(classes[i].substr(0,8)=='wysiwyg-'){var parts=classes[i].split('-');var value=parts.slice(2).join('-');params[parts[1]]=value;}}
params.format='format'+params.format;params.status=parseInt(params.status,10);params.toggle=parseInt(params.toggle,10);params.resizable=parseInt(params.resizable,10);return params;};Drupal.wysiwygInit();;