// Place your application-specific JavaScript functions and classes here
// This file is automatically included by javascript_include_tag :defaults






function switchMapGallery(new_content_class,div){
    newli = jQuery(div);
    oldli = newli.parent().find(".active");
    oldli.removeClass("active");
    newli.addClass("active");
    oldcontent = jQuery(".map-gallery-options .active");
    newcontent = jQuery("."+new_content_class);
    oldcontent.removeClass("active");
    newcontent.addClass("active");
}
function OpenMyNotification(div){
                        div = jQuery(div);
                        note = jQuery("#contact_notification");

                        if (div.hasClass("active")){
                            note.slideUp();
                            div.removeClass("active");
                        } else {
                            note.slideDown();
                            div.addClass("active");
                        }
                    }

var host = (("https:" == document.location.protocol) ? "https://secure." : "http://");document.write(unescape("%3Cscript src='" + host + "wufoo.com/scripts/embed/form.js' type='text/javascript'%3E%3C/script%3E"));


 jQuery(function() {
       jQuery('select').addClass("ui-widget-content").addClass("ui-corner-all");
      jQuery( ".ui-buttonset").buttonset();
       jQuery('.reverse-hover').hover(
            function(){
                jQuery(this).removeClass('ui-state-hover');
            }, function(){ jQuery(this).addClass('ui-state-hover'); }
);
});

    function getUrlVars(){
             var vars = [], hash;
             var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
             for(var i = 0; i < hashes.length; i++)
             {
                 hash = hashes[i].split('=');
                 vars.push(hash[0]);
                 vars[hash[0]] = hash[1];
             }
             return vars;
     }

    function GoToPage(url){
        window.location=url;
    }
    jQuery(function() {
          jQuery( ".download_now" ).button();
          jQuery( ".ui-buttonset" ).buttonset();
    });
     function displayNotification(txt){
         notice = jQuery('#account-flash-notice-container');
             notice.append('<div class="account-flash-notice ui-corner-all"><div class="body-text">'+txt+'</div></div>');
             item = notice.find(".account-flash-notice").last();
             item.fadeIn(1000).delay(5000).fadeOut(1000);
    }

    jQuery(function() {
        jQuery( "#modal-notification" ).dialog({
            autoOpen: false,
            height: 500,
            width: 730,
            modal: true,
            title:"New Message",
            buttons: {
                "Send": function() {
                        jQuery(this).find("form").submit();
                        jQuery(this).dialog("close");
                },
                Cancel: function() {
                    jQuery( this ).dialog( "close" );
                }
            },
            close: function() {
            }
        });
    });
