
/* Merged Plone Javascript file
 * This file is dynamically assembled from separate parts.
 * Some of these parts have 3rd party licenses or copyright information attached
 * Such information is valid for that section,
 * not for the entire composite file
 * originating files are separated by - filename.js -
 */

/* - ++resource++carousel.js - */
// http://www.idahoconservation.org/portal_javascripts/++resource++carousel.js?original=1
var carousel_interval;if(jq('#carousel')){var carousel_rotate=function(){features=jq('.carousel-banner');if(features.length<2)
return;jq('.carousel-banner:visible').fadeOut(600);jq('.carousel-button.selected').removeClass('selected');next=jq('.carousel-banner:visible').next('.carousel-banner');if(next.length){next.fadeIn(600);jq('#carousel-button-'+next.attr('id').substr(16)).addClass('selected')} else{jq('#carousel-banner-0').fadeIn(600);jq('.carousel-button:first').addClass('selected')}};jq(function(){carousel_interval=setInterval(carousel_rotate,8000);setTimeout(function(){jq('#carousel .link-https, #carousel .link-external').each( function(){jq(this).replaceWith(jq(this).html())})},1000);jq('#carousel').hover(
function(){clearInterval(carousel_interval)},
function(){carousel_interval=setInterval(carousel_rotate,8000)})})}


/* - ++resource++simplesocial.js - */
// http://www.idahoconservation.org/portal_javascripts/++resource++simplesocial.js?original=1
document.documentElement.setAttribute('xmlns:fb','http://www.facebook.com/2008/fbml');if(document.namespaces){document.namespaces.add('fb')}
var SimpleSocial={callbacks:{},connected:false,settings:{},queue:[],addSettings: function(settings){for(setting in settings){this.settings[setting]=settings[setting]}},connect: function(callback){var app_id=parseInt(this.settings.app_id);var callback=this.getCallback(callback);if(!isNaN(app_id)){var query_template='SELECT display_name FROM application WHERE app_id={0}';var apps=FB.Data.query(query_template,app_id);var simplesocial=this;FB.Data.waitOn([apps], function(args){if(apps.value.length){FB.init({appId:app_id,status:true,cookie:true,xfbml:true,oauth:true});simplesocial.connected=true;callback({'connected':true,'display_name':apps.value[0].display_name})} else{simplesocial.connected=false;callback({'connected':false})}})}},processQueue: function(){for(i=0;i<this.queue.length;i++){this.queue[i]()}
this.queue={processed:true,push: function(callback){callback()}}},populateChoices: function(el,query){if(el){FB.Data.waitOn([query], function(args){if(query.value.length&&query.fields.length==2){var choices=document.createElement('select');choices.id=el.id;choices.name=el.name;var current_value=el.value;for(i=0;i<query.value.length;i++){var row=query.value[i];var option=document.createElement('option');option.value=row[query.fields[0]];option.text=row[query.fields[1]];if(row[query.fields[0]]==current_value) option.selected='selected';try{choices.add(option,null)} catch(ex){choices.add(option)}}
el.parentNode.replaceChild(choices,el)}})}},unpopulateChoices: function(el){if(el&&el.tagName=='SELECT'){var input=document.createElement('input');input.id=el.id;input.name=el.name;input.value=el.childNodes[el.selectedIndex].value;el.parentNode.replaceChild(input,el)}},publishToPage: function(attachment){FB.ui({method:'stream.publish',attachment:attachment,actor_id:this.settings.page_id},this.getCallback('publishToPage'))},getCallback: function(callback){if(typeof(callback)=='string'){if(this.callbacks[callback]){return this.callbacks[callback]} else{return function(){}}} else if(callback==undefined){return function(){}}
return callback}};

