//Must be unique if more than one AdCludd form is used on one page
AdCloud.name     = 'f3';   

//Make VERY SURE to have this set properly before going live
AdCloud.testMode = 0;

//Show found merchant or just the success message
AdCloud.showMerch = 1;

//Attach location href if necessary
AdCloud.sendReferrer = 1;

//The form action
AdCloud.action   = 'https://ormigo.com/api/json/leads/add/';

//These texts appear in the form later
AdCloud.headline = 'Jetzt pers&ouml;nliches Angebot anfordern!';
AdCloud.body     = 'Treffen Sie die richtige Wahl! Lassen Sie sich jetzt <strong>kostenlos</strong> von einem unabh&auml;ngigen Experten in Ihrer Nähe beraten.';
AdCloud.terms    = 'Ich stimme der <a target="_blank" href="https://ormigo.com/datenschutz/">Datenschutzerkl&auml;rung</a> zu.';
AdCloud.success  = '<h3>Vielen Dank für Ihre Anfrage!</h3>Wir haben einen pers&ouml;nlichen Ansprechpartner f&uuml;r Sie gefunden, der Sie in Kürze kontaktieren und ein pers&ouml;nliches Angebot erstellen wird.';
AdCloud.test     = '<p><strong>TESTBETRIEB</strong>Wir haben einen Dienstleister f&uuml;r Sie gefunden</p>';
AdCloud.notice   = 'Bitte &uuml;berpr&uuml;fen Sie die Angaben in den markierten Feldern.';
AdCloud.error    = 'Ein Fehler ist aufgetreten! Bitte versuchen Sie die Sie die Seite neu zu laden.';
AdCloud.button   = 'Jetzt Informieren';
AdCloud.progress = 'Daten werden geladen...';

//This markup is being appended to the success string if showMerch is set to 1
AdCloud.successHTML = '<h3>Ihr Ansprechpartner: ' + '#merchant_name' + ' aus ' + '#merchant_address' + '</h3>' +
                      '<div>' +
                        '<span class="photo">' +
                        '<img src="#merchant_photo" alt="#merchant_name" />' +
                      '</span>'+
                      '</div>';                      

//This is the actual form markup
AdCloud.formHTML = '<div id="AdCloud-'+AdCloud.name+'-container">' +
                    '<div id="AdCloud-'+AdCloud.name+'-message"></div>' +
                    '<h2>'+AdCloud.headline+'</h2>' +
                    '<div id="AdCloud-'+AdCloud.name+'-bodycopy">'+AdCloud.body+'</div>' +
                    '<form onsubmit="AdCloud.get(this); return false;" id="AdCloud-'+AdCloud.name+'-form" name="'+AdCloud.name+'" method="get" action="#">' +
                     '<fieldset>' +  
                      '<div>' +
                       '<label for="#gender">Anrede</label>' + 
                       '<select id="#gender" name="gender" />' +
                        '<option value="0">Bitte ausw&auml;hlen</option>' +
                        '<option value="1">Frau</option>' +
                        '<option value="2">Herr</option>' + 
                       '</select>' +    
                      '</div>' +                   
                      '<div>' +
                       '<label for="#firstname">Vorname</label>' + 
                       '<input type="text" id="#firstname" name="firstname" />' + 
                      '</div>' +
                      '<div>' +
                       '<label for="#lastname">Nachname</label>' + 
                       '<input type="text" id="#lastname" name="lastname" />' + 
                      '</div>' +
                      '<div>' +
                       '<label for="#street">Stra&szlig;e/Nr.</label>' + 
                       '<input type="text" id="#street" name="street" />' + 
                      '</div>' +
                      '<div>' +
                       '<label>PLZ/Stadt</label>' + 
                       '<input class="zipcode" type="text" id="#zipcode" name="zipcode" />' + 
                       '<input class="city" type="text" id="#city" name="city" />' +     
                      '</div>' +
                      '<div>' +
                       '<label for="#country">Land</label>' + 
                       '<select id="#country" name="country" />' +
                        '<option value="1">Deutschland</option>' +
                        '<option value="2">&Ouml;sterreich</option>' + 
                        '<option value="3">Schweiz</option>' +
                       '</select>' +    
                      '</div>' +
                      '<div>' +
                       '<label for="#email">E-Mail</label>' + 
                       '<input type="text" id="#email" name="email" />' +                       
                      '</div>' +
                      '<div>' +
                       '<label for="#phone">Telefon</label>' + 
                       '<input type="text" id="#phone" name="phone" />' + 
                      '</div>' +
                      '<div>' +
                       '<label for="#mobile">Handy</label>' + 
                       '<input type="text" id="#mobile" name="mobile" />' + 
                      '</div>' +
                      '<div>' +
                       '<input class="checkbox" type="checkbox" id="#privacy_policy" name="privacy_policy" value="1" />' +
                       '<label for="#privacy_policy" class="privacy_policy">'+AdCloud.terms+'</label>' + 
                      '</div>' +
                      '<div class="button">' +
                       '<input class="hidden" type="hidden" name="your_api_hash" value="'+AdCloud.yourApiHash+'" />' + 
                       '<input class="hidden" type="hidden" name="flight" value="'+AdCloud.flight+'" />' +
                       '<input class="hidden" type="hidden" name="campaign" value="'+AdCloud.campaign+'" />' +
                       '<input class="hidden" type="hidden" name="test" value="'+AdCloud.testMode+'" />' +
                       '<input class="submit" type="submit" value="'+AdCloud.button+'" />' +
                      '</div>' + 
                     '</fieldset>' +
                    '</form>' + 
                   '</div>'; 