
  /* Modified by Alex Spooner, 2009-05-26 02:44:38 EST */
  /* Modified by Attila Pest, 2009-07-02 08:01:59 EST */
  
  function flash_open()
  {
    $("#flash_holder").attr("class","big_holder"); 
    $("#flash_main").attr("class","big");
  }
  
  function flash_close()
  {
    $("#flash_holder").attr("class","small_holder"); 
    $("#flash_main").attr("class","");
  }    
  
  function sendform()
  {
      $("#ajaxform").submit(function(event){
        event.preventDefault();
        var req = $(this).serialize();
        $('#error').empty();
        $.getJSON("/ajax/sendform.php",req,function(data){
          if (data.success==true){
                $('#error').append("<p class='bless'><span>" + data.bless + "</span><br /></p>");
                $('#ajaxform').empty();
          } else {
                $.each(data.crash, function() {
                  $('#error').append("<p class='crash'><span>" + this + "</span><br /></p>");
                });
          }      

        });
        return false;
      }); 
  }
  
  // POST JSON
  $.postJSON = function(url, data, callback) { $.post(url, data, callback, "json"); };
  
  $(document).ready(function(){

    // FANCYBOX
    $("a.fancybox").fancybox({
      'overlayShow'     : false,
      'zoomSpeedIn'     : 600,
      'zoomSpeedOut'    : 500,
      'easingIn'        : 'easeOutBack',
      'easingOut'       : 'easeInBack'
    }); 

    // FLASHEMBED
    $("#id").flashembed("/flashes/flash.swf"); 

    // SIFR
    $("h1.sifr").each(function() {             
      flashembed(this, "/flashes/font.swf", { 
        txt: $(this).html(),             
        css: '* { color: #666666; } a {color: #007766; text-decoration:underline}' 
      });         
    });
    $("#callform").hide();
    $("#openform").click(function(event) {
      event.preventDefault();
      $("#callform").slideDown("slow");
      sendform();  
    });   
    $("#closeform").click(function(event) {
      event.preventDefault(); 
      $("#callform").slideUp("slow");  
    });
    
  });
