// $Id: script.js,v 1.2 2009/04/26 23:39:04 jmburnz Exp $/** * Animates submit buttons */var Genesis = {};// jump to the value in a select drop downGenesis.go = function(e) {  var destination = e.options[e.selectedIndex].value;  if (destination && destination != 0) location.href = destination;};// prevent users from clicking a submit button twiceGenesis.formCheck = function() {  // only apply this to node and comment and new user registration forms  var forms = $("#node-form>div>div>#edit-submit,#comment-form>div>#edit-submit,#user-register>div>#edit-submit");  // insert the saving div now to cache it for better performance and to show the loading image  $('<div id="saving"><p class="saving">Saving&hellip;</p></div>').insertAfter(forms);  forms.click(function() {    $(this).siblings("input[@type=submit]").hide();    $(this).hide();    $("#saving").show();    var notice = function() {      $('<p id="saving-notice">Not saving? Wait a few seconds, reload this page, and try again.</p>').appendTo("#saving").fadeIn();    };    // append notice if form saving isn't work, perhaps a timeout issue    setTimeout(notice, 24000);  });};// Global Killswitch.if (Drupal.jsEnabled) {  $(document).ready(Genesis.formCheck);};
// script for refine search option
var $jq = jQuery.noConflict()

//Search Code
$jq(document).ready(function() {
	$jq('a.refine-search-toggle').toggle(function() {
		$jq('#block-views-f548ba87c56a42e5a4ec239cfc77ed2f .views-exposed-widgets').show();
		$jq(this).css({color:'black'});
		$jq('.refine-search').addClass('refine-search-show-toggle');
		$jq('.refine-search').removeClass('refine-search-hide-toggle');
		}, function() {
		$jq('#block-views-f548ba87c56a42e5a4ec239cfc77ed2f .views-exposed-widgets').hide();
		$jq('.refine-search').addClass('refine-search-hide-toggle');
		$jq('.refine-search').removeClass('refine-search-show-toggle');
		$jq(this).css({color:'white'});
});
});	

// script for scrolling sidebar
$jq(function () {
  
  var msie6 = $jq.browser == 'msie' && $jq.browser.version < 7;
  
  if (!msie6) {
    var top = $jq('#blockinside').offset().top - parseFloat($jq('#blockinside').css('margin-top').replace(/auto/, 0));
    $jq(window).scroll(function (event) {
      // what the y position of the scroll is
      var y = $jq(this).scrollTop();
      
      // whether that's below the form
      if (y >= top) {
        // if so, ad the fixed class
        $jq('#blockinside').addClass('fixed');
      } else {
        // otherwise remove it
        $jq('#blockinside').removeClass('fixed');
      }
    });
  }  
});
;

