/*DIPS.Web.UI.Scripts.dialog.contact.js*//* This file was compressed using DIPS.Web.Compression library. http://www.gelistirici.com */ 
(function($){$.fn.contact=function(settings){var options=$.extend({language:"",margin:5,showEffect:false,hideEffect:false,click:false,hideDelay:0,showDelay:.1,showCallback:function(){},hideCallback:function(){},customcontact:false,customcontactCache:true},settings);this.each(function(){if(!$.isFunction(options.customcontact)){$(this).data("$contact",getcontact(this).hide());}
$(this).bind("click",{"options":options,"target":this},opencontact);});return this;};function getcontact(target){var $target=$(target);this.mainID=$target[0].id;this.admDiv=$("<div>").attr({id:"admin"});this.mainDiv=$("<div>").attr({id:mainID+"_popup-box"});this.mainDiv.addClass('contact');this.contactLoading=$("<img>").attr({id:mainID+"_loading",src:"/Themes/Default/Design/Dialogs/Images/loading.gif",style:"display:none;"});this.contactForm=$("<form>").attr({id:mainID+"_contact-form",name:mainID+"_contact-form",method:"post",enctype:"multipart/form-data"});this.contactForm.addClass("cmxform");this.contactForm.validate({meta:"validate"});this.contactTable=$("<table>").attr({id:mainID+"_contact-table",cellspacing:"0",cellpadding:"0",border:"0"});this.subjectID=CreateSelectTr("subjectID",mainID,$.contactText.SUBJECTID_OPTIONS,$.contactText.SUBJECTID_LABEL,true,""," {validate:{blanknotallowed:true, messages:{required:'"+$.contactText.SUBJECTID_REQUIRED+"'}}}");this.fullName=CreateInputTr("fullName",mainID,50,$.contactText.FULLNAME_LABEL,true,""," {validate:{required:true, messages:{required:'"+$.contactText.FULLNAME_REQUIRED+"'}}}");this.company=CreateInputTr("company",mainID,50,$.contactText.COMPANY_LABEL,false,"");this.subject=CreateInputTr("subject",mainID,50,$.contactText.SUBJECT_LABEL,true,""," {validate:{required:true, messages:{required:'"+$.contactText.SUBJECT_REQUIRED+"'}}}");this.eMail=CreateInputTr("eMail",mainID,50,$.contactText.EMAIL_LABEL,true,""," {validate:{required:true, email:true, messages:{required:'"+$.contactText.EMAIL_REQUIRED+"',email:'"+$.contactText.EMAIL_MAIL+"'}}}");this.phone=CreateInputTr("phone",mainID,50,$.contactText.PHONE_LABEL,false,"");this.address=CreateInputTr("address",mainID,50,$.contactText.ADDRESS_LABEL,false,"");this.message=CreateTextAreaTr("message",mainID,50,3,$.contactText.MESSAGE_LABEL,true,""," {validate:{required:true, messages:{required:'"+$.contactText.MESSAGE_REQUIRED+"'}}}");this.remark=$("<tr>");this.remark.append($("<td>").attr({colspan:"2"}).dHtml($.contactText.REMARK));this.commands=CreateCommandsTr("commands",mainID,$.contactText.APPLY_BUTTON,$.contactText.CANCEL_BUTTON);this.contactTable.append(this.subjectID);this.contactTable.append(this.fullName);this.contactTable.append(this.company);this.contactTable.append(this.subject);this.contactTable.append(this.eMail);this.contactTable.append(this.phone);this.contactTable.append(this.address);this.contactTable.append(this.message);this.contactTable.append(this.remark);this.contactTable.append(this.commands);this.contactForm.append(this.contactTable);this.mainDiv.append(this.contactLoading);this.mainDiv.append(this.contactForm);this.admDiv.append(this.mainDiv);this.dialogDiv=CreateModalDialog(mainID,$.contactText.TITLE,admDiv);return this.dialogDiv;};function initcontact($contact,mainID){$contact.appendTo(document.body).data("width",$contact.outerWidth()).data("height",$contact.outerHeight()).css({"position":"absolute","zIndex":"9998","display":"none"}).find("#"+mainID+"_commands-apply-button").click(function(e){e.preventDefault();$contact.trigger("send",mainID);}).end().find("#"+mainID+"_commands-cancel-button").click(function(e){e.preventDefault();$contact.trigger("cancel");}).end().data("init",true);};function opencontact(e){if(e.type=="click"){e.preventDefault();}
var opts=e.data.options;var $target=$(e.data.target);var mainID=$target[0].id;if(!opts.customcontactCache&&$target.data("$contact")){$target.data("$contact").remove();$target.data("$contact",false);}
if(!$target.data("$contact")){$target.data("$contact",$(opts.customcontact($target.get(0))));}
var $contact=$target.data("$contact");if(!$contact.data("init")){initcontact($contact,mainID);}
$contact.unbind("show").unbind("apply").unbind("cancel").unbind("send").unbind("completed");if(opts.showEffect&&(opts.showEffect.match(/^fadeIn|slideDown|show$/))){$contact.bind("show",function(){$contact[opts.showEffect](200);opts.showCallback($target[0],this);});}
else{$contact.bind("show",function(){$contact.show();opts.showCallback($target[0],this);});}
if(opts.hideEffect&&(opts.hideEffect.match(/^fadeOut|slideUp|hide$/))){$contact.bind("apply",function(){opts.hideCallback($target[0],this);$contact[opts.hideEffect](200);$("#"+mainID+"_dialog").jqmHide();});}
else{$contact.bind("apply",function(){opts.hideCallback($target[0],this);$("#"+mainID+"_dialog").jqmHide();});}
if(opts.hideEffect&&(opts.hideEffect.match(/^fadeOut|slideUp|hide$/))){$contact.bind("cancel",function(){opts.hideCallback($target[0],this);$contact[opts.hideEffect](200);$("#"+mainID+"_dialog").jqmHide();});}
else{$contact.bind("cancel",function(){opts.hideCallback($target[0],this);$("#"+mainID+"_dialog").jqmHide();});}
$contact.bind("completed",function(e,data){var text=data.text.d;var sp=text.split(";");var errNum=sp[0];if(errNum=="0")
$contact.trigger("apply");else
ShowMessage(data.mainID,errNum);});$contact.bind("send",function(e,mainID){if($("#"+mainID+"_contact-form").valid()){$("#"+mainID+"_loading").ajaxStart(function(){$(this).show();}).ajaxComplete(function(){$(this).hide();});var subjectID=$("#"+mainID+"_subjectID-lookupbox").val();var fullName=$("#"+mainID+"_fullName-input").val();var company=$("#"+mainID+"_company-input").val();var subject=$("#"+mainID+"_subject-input").val();var eMail=$("#"+mainID+"_eMail-input").val();var phone=$("#"+mainID+"_phone-input").val();var address=$("#"+mainID+"_address-input").val();var message=$("#"+mainID+"_message-input").val();var params="{'subjectID':'"+subjectID+"','fullName':'"+fullName+"','company':'"+company+"','subject':'"+subject+"','eMail':'"+eMail+"','phone':'"+phone+"','address':'"+address+"','message':'"+message+"','language':'"+opts.language+"'}";var dataString="{'methodName':'SaveContact','parameters':"+params+"}";$.ajax({type:"POST",url:document.URL+"/Call.wme",data:dataString,contentType:"application/json; charset=utf-8",dataType:"json",success:function(text){$contact.trigger("completed",{mainID:mainID,text:text});}});}
return false;});$("#"+mainID+"_dialog").jqm({modal:true,overlay:50,trigger:false,overlayClass:'whiteOverlay'}).jqDrag('.jqDrag');$('input.jqmdX').hover(function(){$(this).addClass('jqmdXFocus');},function(){$(this).removeClass('jqmdXFocus');}).focus(function(){this.hideFocus=true;$(this).addClass('jqmdXFocus');}).blur(function(){$(this).removeClass('jqmdXFocus');});$("#"+mainID+"_dialog").jqmShow();$("#"+mainID+"_contact-form").resetForm();};function GetE(elementId){return document.getElementById(elementId);}
$.contactText={TITLE:'İletişim Formu',SUBJECTID_LABEL:'Konu Tipi : ',SUBJECTID_OPTIONS:{"0":"Seçim Yok"},SUBJECTID_REQUIRED:'`Konu Tipi` alanı boş olamaz.',FULLNAME_LABEL:'Ad Soyad : ',FULLNAME_REQUIRED:'`Adı Soyad` alanı boş olamaz.',COMPANY_LABEL:'Firma : ',SUBJECT_LABEL:'Konu : ',SUBJECT_REQUIRED:'`Konu` alanı boş olamaz.',EMAIL_LABEL:'E-posta Adresi : ',EMAIL_REQUIRED:'`E-posta Adresi` alanı boş olamaz.',EMAIL_MAIL:'`E-posta Adresi` alanı geçerli bir e-posta adresi içermelidir.',PHONE_LABEL:'Telefon : ',ADDRESS_LABEL:'Adres : ',MESSAGE_LABEL:'Mesajınız : ',MESSAGE_REQUIRED:'`Mesajınız` alanı boş olamaz.',REMARK:'E-posta adresleri kayıt edilmemektedir. ',APPLY_BUTTON:'Gönder',CANCEL_BUTTON:'Vazgeç'};})(jQuery);