/************************************************************************
 * @name: bPopup
 * @author: (c) Bjoern Klinggaard (http://dinbror.dk/bpopup)
 * @version: 0.5.0.min
 ************************************************************************/
 
function deschidere_banner_fito()
{
window.open("http://www.localuri.ro/restaurant-Fitto-Cafe-651");
location.replace("http://www.fittocafe.ro/");
};

 function verifica_datele_completate()
{

var eveniment=document.getElementById("top_eveniment2").value;
if(eveniment.length<2)
{
alert("Va rugam selectati evenimentul!");
return false;
};

var locuri=document.getElementById("top_minim_locuri2").value;
if(locuri.length<2)
{
alert("Va rugam selectati numarul de invitati!");
return false;
};

var data=document.getElementById("top_data2").value;
if(data.length<5)
{
alert("Va rugam completati perioada dorita!");
return false;
};

var nume=document.getElementById("top_nume2").value;
if(nume.length<5)
{
alert("Va rugam completati numele dumneavoastra!");
return false;
};

var email=document.getElementById("top_email2").value;
if(email.length<5)
{
alert("Va rugam completati adresa de email!");
return false;
};

var telefon=document.getElementById("top_telefon2").value;
if(telefon.length<4)
{
alert("Pentru acuratetea solicitarii dumneavoastra, va recomandam sa completati numarul de telefon. /n/n Daca nu doriti ca numarul dumneavoastra de telefon sa fie trimis, va rugam completati 1234.");
return false;
};


var mesaj=document.getElementById("top_mesaj2").value;
document.getElementById("ext-gen15").style.display="none";
return true;

};



function verifica_datele_completate_contact()
{

var locuri=document.getElementById("top_minim_locuri2_main").value;
if(locuri.length<2)
{
alert("Va rugam selectati numarul de invitati!");
return false;
};

var data=document.getElementById("top_data2_main").value;
if(data.length<5)
{
alert("Va rugam completati perioada dorita!");
return false;
};

var nume=document.getElementById("top_nume2_main").value;
if(nume.length<5)
{
alert("Va rugam completati numele dumneavoastra!");
return false;
};

var email=document.getElementById("top_email2_main").value;
if(email.length<5)
{
alert("Va rugam completati adresa de email!");
return false;
};

document.getElementById("ext-gen15").style.display="none";
return true;

};
 
 
 
function verifica_datele_completate_trimitMesaj()
{

var mesaj=document.getElementById("top_mesaj2_trimitMesaj").value;
if(mesaj.length<15)
{
alert("Ati uitat sa scrieti mesajul!");
return false;
};

var nume=document.getElementById("top_nume2_trimitMesaj").value;
if(nume.length<5)
{
alert("Va rugam completati numele dumneavoastra!");
return false;
};

var email=document.getElementById("top_email2_trimitMesaj").value;
if(email.length<5)
{
alert("Va rugam completati adresa de email!");
return false;
};

document.getElementById("ext-gen15").style.display="none";
return true;

};





 $j(document).ready(function(){

            $j("#em2b").bind("click", function(){
                $j("#popup").bPopup({amsl:50, fadeSpeed:'slow',modalColor:'Black',scrollBar:false});
                document.getElementById("top_eveniment_formular").value=document.getElementById("top_eveniment_formular_main").value;
                return false
            })
            
            $j("#em3b").bind("click", function(){
                $j("#popup2").bPopup({amsl:50, fadeSpeed:'slow',modalColor:'Black',scrollBar:false});
                    document.getElementById("top_eveniment2").value=document.getElementById("top_eveniment").value;
                    document.getElementById("top_data2").value=document.getElementById("top_data").value;
                    document.getElementById("top_minim_locuri2").value=document.getElementById("top_minim_locuri").value;
                return false
            })
            
            
            $j("#em4b").bind("click", function(){
                $j("#popup2").bPopup({amsl:50, fadeSpeed:'slow',modalColor:'Black',scrollBar:false});
                    document.getElementById("top_eveniment2").value=document.getElementById("top_eveniment_index").value;
                    document.getElementById("top_data2").value=document.getElementById("top_data_index").value;
                    document.getElementById("top_minim_locuri2").value=document.getElementById("top_minim_locuri_index").value;
                return false
            })
       });

 
(function(a){a.fn.bPopup=function(i,k){function u(){c.css({left:f,position:"absolute",top:g,"z-index":o.zIndex}).appendTo(o.appendTo).hide(function(){a.isFunction(o.onOpen)&&o.onOpen.call(c);if(o.loadUrl!=null){o.contentContainer=o.contentContainer==null?c:a(o.contentContainer);switch(o.content){case "iframe":a('<iframe width="100%" height="100%"></iframe>').attr("src",o.loadUrl).appendTo(o.contentContainer);break;default:o.contentContainer.load(o.loadUrl)}}}).fadeIn(o.fadeSpeed,function(){a.isFunction(k)&& k()});v()}function j(){o.modal&&a("#bModal").fadeOut(o.fadeSpeed,function(){a("#bModal").remove()});c.fadeOut(o.fadeSpeed,function(){o.loadUrl!=null&&o.content!="xlink"&&o.contentContainer.empty()});o.scrollBar||a("html").css("overflow","auto");a("."+o.closeClass).die("click");a("#bModal").die("click");b.unbind("keydown.bPopup");e.unbind(".bPopup");c.data("bPopup",null);a.isFunction(o.onClose)&&setTimeout(function(){o.onClose.call(c)},o.fadeSpeed);return false}function w(){if(m||x){var d=[b.height(), b.width()];return{"background-color":o.modalColor,height:d[0],left:l(),opacity:0,position:"absolute",top:0,width:d[1],"z-index":o.zIndex-1}}else return{"background-color":o.modalColor,height:"100%",left:0,opacity:0,position:"fixed",top:0,width:"100%","z-index":o.zIndex-1}}function v(){a("."+o.closeClass).live("click",j);o.modalClose&&a("#bModal").live("click",j).css("cursor","pointer");if(o.follow[0]||o.follow[1])e.bind("scroll.bPopup",function(){c.stop().animate({left:o.follow[1]?b.scrollLeft()+ f:f,top:o.follow[0]?b.scrollTop()+g:g},o.followSpeed)}).bind("resize.bPopup",function(){if(o.modal&&m){var d=[b.height(),b.width()];n.css({height:d[0],width:d[1],left:l()})}h=p(c,o.amsl);if(o.follow[0])g=q?b.scrollTop()+o.position[0]:b.scrollTop()+h[0];if(o.follow[1])f=r?b.scrollLeft()+o.position[1]:b.scrollLeft()+h[1];c.stop().animate({left:f,top:g},o.followSpeed)});o.escClose&&b.bind("keydown.bPopup",function(d){d.which==27&&j()})}function l(){return e.width()<a("body").width()?0:(a("body").width()- e.width())/2}function p(d,y){var s=(e.height()-d.outerHeight(true))/2-y,z=(e.width()-d.outerWidth(true))/2+l();return[s<20?20:s,z]}if(a.isFunction(i)){k=i;i=null}o=a.extend({},a.fn.bPopup.defaults,i);o.scrollBar||a("html").css("overflow","hidden");var c=a(this),n=a('<div id="bModal"></div>'),b=a(document),e=a(window),h=p(c,o.amsl),q=o.position[0]!="auto",r=o.position[1]!="auto",g=q?o.position[0]:b.scrollTop()+h[0],f=r?o.position[1]:b.scrollLeft()+h[1],t=navigator.userAgent.toLowerCase(),x=t.indexOf("iphone")!= -1,m=/msie 6/i.test(t)&&typeof window.XMLHttpRequest!="object";this.close=function(){o=c.data("bPopup");j()};return this.each(function(){if(!c.data("bPopup")){o.modal&&n.css(w()).appendTo(o.appendTo).animate({opacity:o.opacity},o.fadeSpeed);c.data("bPopup",o);u()}})};a.fn.bPopup.defaults={amsl:50,appendTo:"body",closeClass:"bClose",content:"ajax",contentContainer:null,escClose:true,fadeSpeed:250,follow:[true,true],followSpeed:500,loadUrl:null,modal:true,modalClose:true,modalColor:"#000",onClose:null, onOpen:null,opacity:0.7,position:["auto","auto"],scrollBar:true,zIndex:9999}})(jQuery);
