﻿$(document).ready(function(){var c="70%",b=false,a=true,d=".divAdvanceDtl";$(d).hide();
$(".divAdvanceSearch").click(function(){$(d).slideToggle(800)});
$("#txtPwd").bind("paste",function(a){a.preventDefault();alert("You cannot paste text into this textbox!")});$(".AdvPhoto").colorbox({width:700,height:350,iframe:a,overlayClose:b});$(".contactDadhich").colorbox({width:700,height:350,iframe:a,overlayClose:b});$(".termsDadhich").colorbox({width:"80%",height:c,iframe:a,overlayClose:b});$(".disclaimerDadhich").colorbox({width:c,height:"60%",iframe:a,overlayClose:b});$(".about_dadhichMatrimony").colorbox({width:c,height:"60%",iframe:a,overlayClose:b});
$(".dadhichMatrimony_PrivacyPolicy").colorbox({width:c,height:"60%",iframe:a,overlayClose:b});
$(document).pngFix()});(function(i){var E=":first",D="first",n="style",x="scrollingHotSpotRightVisible",w="scrollingHotSpotLeftVisible",C="mousedown",B="mouseout",A="autoScrollIntervalStopped",z="mouseover",H="always",y="visible",G="originalElements",m="swappedElement",v="startAtElementHasNotPassed",s="swapAt",h=true,l="getNextElementWidth",u="pingPongDirection",t="previousScrollLeft",F="hideHotSpotBackgroundsInterval",d="autoScrollInterval",r="leftScrollInterval",g=null,q="rightScrollInterval",p="startingPosition",k="scrollableAreaWidth",f="scrollXPos",e="scrollableArea",b="scrollingHotSpotLeft",c="scrollingHotSpotRight",a="scrollWrapper",o="right",j=false;i.widget("thomaskahn.smoothDivScroll",{options:{scrollingHotSpotLeft:"div.scrollingHotSpotLeft",scrollingHotSpotRight:"div.scrollingHotSpotRight",scrollableArea:"div.scrollableArea",scrollWrapper:"div.scrollWrapper",hiddenOnStart:j,ajaxContentURL:"",countOnlyClass:"",scrollStep:15,scrollInterval:10,mouseDownSpeedBooster:3,autoScroll:"",autoScrollDirection:o,autoScrollStep:5,autoScrollInterval:10,visibleHotSpots:"",hotSpotsVisibleTime:5,startAtElementId:""},_create:function(){var J="mousemove",I="onstart",E="hotSpotWidth",D="motherElementOffset",x="speedBooster",w=this,n=this.options,j=this.element;j.data(a,j.find(n.scrollWrapper));j.data(c,j.find(n.scrollingHotSpotRight));j.data(b,j.find(n.scrollingHotSpotLeft));j.data(e,j.find(n.scrollableArea));j.data(x,1);j.data(D,j.offset().left);j.data(f,0);j.data(E,j.find(n.scrollingHotSpotLeft).width());j.data(k,0);j.data(p,0);j.data(q,g);j.data(r,g);j.data(d,g);j.data(F,g);j.data(t,0);j.data(u,o);j.data(l,h);j.data(s,g);j.data(v,h);j.data(m,g);j.data(G,j.data(e).children(n.countOnlyClass));j.data(y,h);w.recalculateScrollableArea();j.data(a).scrollLeft(j.data(p));if(n.autoScroll!==H)switch(n.visibleHotSpots){case H:w.showHotSpotBackgrounds();break;case I:w.showHotSpotBackgrounds();j.data(F,setTimeout(function(){w.hideHotSpotBackgrounds("slow")},n.hotSpotsVisibleTime*1e3))}j.data(c).bind(J,function(a){var b=a.pageX-(this.offsetLeft+j.data(D));j.data(f,Math.round(b/j.data(E)*n.scrollStep));j.data(f)===Infinity&&j.data(f,0)});j.data(c).bind(z,function(){if(n.autoScroll===I&&j.data(d)!==g){clearInterval(j.data(d));j.data(d,g);w._trigger(A)}j.data(q,setInterval(function(){if(j.data(f)>0){j.data(a).scrollLeft(j.data(a).scrollLeft()+j.data(f)*j.data(x));w._showHideHotSpots()}},n.scrollInterval));w._trigger("mouseOverRightHotSpot")});j.data(c).bind(B,function(){clearInterval(j.data(q));j.data(f,0)});j.data(c).bind(C,function(){j.data(x,n.mouseDownSpeedBooster)});i("body").bind("mouseup",function(){j.data(x,1)});j.data(b).bind(J,function(a){var c=j.data(b).innerWidth()-(a.pageX-j.data(D));j.data(f,Math.round(c/j.data(E)*n.scrollStep));j.data(f)===Infinity&&j.data(f,0)});j.data(b).bind(z,function(){if(n.autoScroll===I&&j.data(d)!==g){clearInterval(j.data(d));j.data(d,g);w._trigger(A)}j.data(r,setInterval(function(){if(j.data(f)>0){j.data(a).scrollLeft(j.data(a).scrollLeft()-j.data(f)*j.data(x));w._showHideHotSpots()}},n.scrollInterval));w._trigger("mouseOverLeftHotSpot")});j.data(b).bind(B,function(){clearInterval(j.data(r));j.data(f,0)});j.data(b).bind(C,function(){j.data(x,n.mouseDownSpeedBooster)});i(window).bind("resize",function(){!n.hiddenOnStart&&w._showHideHotSpots();w._trigger("windowResized")});n.autoScroll!==""&&!n.hiddenOnStart&&w.startAutoScroll();n.hiddenOnStart&&w.hide()},showHotSpotBackgrounds:function(d){var e=this,a=this.element;if(d!==undefined){a.data(b).css("opacity","0.0");a.data(c).css("opacity","0.0");a.data(b).addClass(w);a.data(c).addClass(x);a.data(b).fadeTo(d,.35);a.data(c).fadeTo(d,.35)}else{a.data(b).addClass(w);a.data(b).removeAttr(n);a.data(c).addClass(x);a.data(c).removeAttr(n)}e._showHideHotSpots()},hideHotSpotBackgrounds:function(d){var a=this.element;if(d!==undefined){a.data(b).fadeTo(d,0,function(){a.data(b).removeClass(w)});a.data(c).fadeTo(d,0,function(){a.data(c).removeClass(x)})}else{a.data(b).removeClass(w);a.data(b).removeAttr(n);a.data(c).removeClass(x);a.data(c).removeAttr(n)}},_showHideHotSpots:function(){var e=this,d=this.element,f=this.options;if(f.autoScroll!==H)if(d.data(k)<=d.data(a).innerWidth()){d.data(b).hide();d.data(c).hide()}else if(d.data(a).scrollLeft()===0){d.data(b).hide();d.data(c).show();e._trigger("scrollLeftLimitReached");clearInterval(d.data(r));d.data(r,g)}else if(d.data(k)<=d.data(a).innerWidth()+d.data(a).scrollLeft()){d.data(b).show();d.data(c).hide();e._trigger("scrollRightLimitReached");clearInterval(d.data(q));d.data(q,g)}else{d.data(b).show();d.data(c).show()}else{d.data(b).hide();d.data(c).hide()}},moveToElement:function(o,m){var d=this,b=this.element,l=this.options,c=0,n=j;switch(o){case D:b.data(f,0);d._trigger("movedToFirstElement");break;case"start":b.data(e).children(l.countOnlyClass).each(function(){if(l.startAtElementId.length!==0&&i(this).attr("id")===l.startAtElementId){b.data(p,c);n=h}c=c+i(this).outerWidth(h)});b.data(f,b.data(p));d._trigger("movedToStartElement");break;case"last":b.data(f,b.data(k));d._trigger("movedToLastElement");break;case"number":!isNaN(m)&&b.data(e).children(l.countOnlyClass).each(function(a){a===m-1&&b.data(f,c);c=c+i(this).outerWidth(h)});d._trigger("movedToElementNumber",g,{elementNumber:m})}b.data(a).scrollLeft(b.data(f));d._showHideHotSpots()},addContent:function(c,d){var a=this,b=this.element;i.get(c,function(c){if(d===D)b.data(e).children(E).before(c);else b.data(e).children(":last").after(c);a.recalculateScrollableArea();a._showHideHotSpots()})},replaceContent:function(c){var a=this,b=this.element;b.data(e).load(c,function(){a.recalculateScrollableArea();a.moveToElement(D);a._showHideHotSpots();b.data(p,0)})},recalculateScrollableArea:function(){var b=0,d=j,c=this.options,a=this.element;a.data(e).children(c.countOnlyClass).each(function(){if(c.startAtElementId.length!==0&&i(this).attr("id")===c.startAtElementId){a.data(p,b);d=h}b=b+i(this).outerWidth(h)});!d&&a.data("startAtElementId","");a.data(k,b);a.data(e).width(a.data(k))},stopAutoScroll:function(){var a=this,b=this.element;clearInterval(b.data(d));b.data(d,g);a._showHideHotSpots();a._trigger("autoScrollStopped")},startAutoScroll:function(){var f=this,b=this.element,c=this.options;f._showHideHotSpots();clearInterval(b.data(d));b.data(d,g);f._trigger("autoScrollStarted");b.data(d,setInterval(function(){var p="autoScrollLeftLimitReached",n="autoScrollRightLimitReached";if(!b.data(y)||b.data(k)<=b.data(a).innerWidth()){clearInterval(b.data(d));b.data(d,g)}b.data(t,b.data(a).scrollLeft());switch(c.autoScrollDirection){case o:b.data(a).scrollLeft(b.data(a).scrollLeft()+c.autoScrollStep);if(b.data(t)===b.data(a).scrollLeft()){f._trigger(n);clearInterval(b.data(d));b.data(d,g);f._trigger(A)}break;case"left":b.data(a).scrollLeft(b.data(a).scrollLeft()-c.autoScrollStep);if(b.data(t)===b.data(a).scrollLeft()){f._trigger(p);clearInterval(b.data(d));b.data(d,g);f._trigger(A)}break;case"backandforth":if(b.data(u)===o)b.data(a).scrollLeft(b.data(a).scrollLeft()+c.autoScrollStep);else b.data(a).scrollLeft(b.data(a).scrollLeft()-c.autoScrollStep);if(b.data(t)===b.data(a).scrollLeft())if(b.data(u)===o){b.data(u,"left");f._trigger(n)}else{b.data(u,o);f._trigger(p)}break;case"endlessloopright":if(b.data(l)){if(c.startAtElementId!==""&&b.data(v)){b.data(s,i("#"+c.startAtElementId).outerWidth(h));b.data(v,j)}else b.data(s,b.data(e).children(E).outerWidth(h));b.data(l,j)}b.data(a).scrollLeft(b.data(a).scrollLeft()+c.autoScrollStep);if(b.data(s)<=b.data(a).scrollLeft()){b.data(m,b.data(e).children(E).detach());b.data(e).append(b.data(m));b.data(a).scrollLeft(b.data(a).scrollLeft()-b.data(m).outerWidth(h));b.data(l,h)}break;case"endlessloopleft":if(b.data(l)){if(c.startAtElementId!==""&&b.data(v)){b.data(s,i("#"+c.startAtElementId).outerWidth(h));b.data(v,j)}else b.data(s,b.data(e).children(E).outerWidth(h));b.data(l,j)}b.data(a).scrollLeft(b.data(a).scrollLeft()-c.autoScrollStep);if(b.data(a).scrollLeft()===0){b.data(m,b.data(e).children(":last").detach());b.data(e).prepend(b.data(m));b.data(a).scrollLeft(b.data(a).scrollLeft()+b.data(m).outerWidth(h));b.data(l,h)}}},c.autoScrollInterval))},restoreOriginalElements:function(){var a=this,b=this.element;b.data(e).html(b.data(G));a.recalculateScrollableArea();a.moveToElement(D)},show:function(){var a=this.element;a.data(y,h);a.show()},hide:function(){var a=this.element;a.data(y,j);a.hide()},destroy:function(){var f=this.element;clearInterval(f.data(d));clearInterval(f.data(q));clearInterval(f.data(r));clearInterval(f.data(F));f.data(c).unbind(z);f.data(c).unbind(B);f.data(c).unbind(C);f.data(b).unbind(z);f.data(b).unbind(B);f.data(b).unbind(C);f.data(e).html(f.data(G));f.data(e).removeAttr(n);f.data(c).removeAttr(n);f.data(b).removeAttr(n);f.data(a).scrollLeft(0);f.data(b).removeClass(w);f.data(c).removeClass(x);f.data(c).hide();f.data(b).hide();i.Widget.prototype.destroy.apply(this,arguments)}})})(jQuery);$(function(){$("div#makeMeScrollable").smoothDivScroll({autoScroll:"onstart",autoScrollDirection:"backandforth",autoScrollStep:1,autoScrollInterval:25,startAtElementId:"startAtMe",visibleHotSpots:"always"});$(function(){$.gritter.add({title:" ",text:" ",image:"http://dadhichmatrimony.com/Images/SuccessStory/success_story.jpg",sticky:false,time:""});return false})});(function(a){a.fn.hint=function(b){if(!b)b="blur";return this.each(function(){var c=a(this),e=c.attr("title"),f=a(this.form),g=a(window);function d(){c.val()===e&&c.hasClass(b)&&c.val("").removeClass(b)}if(e){c.blur(function(){this.value===""&&c.val(e).addClass(b)}).focus(d).blur();f.submit(d);g.unload(d)}})}})(jQuery);$(function(){$('input[title!=""]').hint()});var _gaq=_gaq||[];_gaq.push(["_setAccount","UA-3655203-2"]);_gaq.push(["_trackPageview"]);(function(){var a=document.createElement("script");a.type="text/javascript";a.async=true;a.src=("https:"==document.location.protocol?"https://ssl":"http://www")+".google-analytics.com/ga.js";var b=document.getElementsByTagName("script")[0];b.parentNode.insertBefore(a,b)})();function SetDefault(){var a="Doesn't Matter";document.getElementById("ddlCaste").value=a;document.getElementById("religion").value=a;document.getElementById("mstatus").value=a;document.getElementById("country").value=a}function loadXmlHttp(){var a;try{a=new XMLHttpRequest}catch(b){try{a=new ActiveXObject("Msxml2.XMLHTTP")}catch(b){try{a=new ActiveXObject("Microsoft.XMLHTTP")}catch(b){alert("Your browser does not support AJAX!");return false}}}return a}function FillCasteBasedOnReligion(){var b=document.getElementById("religion").value;if(b!=""){var a=loadXmlHttp();a.onreadystatechange=function(){var b="CasteDiv";if(a.readyState==4)if(a.status==200)if(a.responseText!=""){document.getElementById(b).innerHTML="";document.getElementById(b).innerHTML=a.responseText;document.getElementById(b).style.display="block"}};a.open("GET","Web/FillSearchdata.aspx?SelectOption=Religion&fillForName="+b,true);a.send(null)}}var OtherIdResponse=false;function openpage(){var c="lblPIDErrormessage",b="txtOtherProfileId",d=document.getElementById(b).value;if(d==""){document.getElementById(c).innerHTML="Please enter Profile ID";document.getElementById(b).value="";document.getElementById(b).focus;return false}else{var a=loadXmlHttp();a.onreadystatechange=function(){if(a.readyState==4)if(a.status==200){if(a.responseText=="No"){document.getElementById(c).innerHTML="Please enter valid Profile Id";document.getElementById(b).value="";document.getElementById(b).focus;OtherIdResponse=false}var d="";d=a.responseText.split(";");if(d[0]=="Yes"){window.open("Web/dOtherProfile.aspx?OtherPId="+d[1],"_parent");OtherIdResponse=false}}};a.open("GET","Web/MoveProfiles.aspx?ActionFor=Open Other Profile&RequestId="+d,true);a.send(null)}return OtherIdResponse}var txtUName,txtPwd,pFlage,xmlHttp,response=false;function ValidatePageUserNameEmail(){var c="lblMsgEU",b="#",f="txtPwd",e="txtUName",d=false,g=d;txtUName=document.getElementById(e).value;txtPwd=document.getElementById(f).value;var a=0;a=txtUName.indexOf(b);while(a>0){txtUName=txtUName.replace(b,"%23");a=txtUName.indexOf(b)}a=0;a=txtPwd.indexOf(b);while(a>0){txtPwd=txtPwd.replace(b,"%23");a=txtPwd.indexOf(b)}if(txtUName==""||txtUName=="User Id"){document.getElementById(c).innerHTML="";document.getElementById(c).innerHTML="Please specify valid User ID.";document.getElementById(e).focus();return d}else if(txtPwd==""||txtPwd=="Password"){document.getElementById(c).innerHTML="";document.getElementById(c).innerHTML="Please specify Password.";document.getElementById(f).focus();return d}else{xmlHttp=loadXmlHttp();xmlHttp.onreadystatechange=function(){if(xmlHttp.readyState==4)if(xmlHttp.status==200){if(xmlHttp.responseText=="No"){document.getElementById(c).innerHTML="";document.getElementById(c).innerHTML="Invalid User ID or Password. Try again.";document.getElementById(e).value="";document.getElementById(f).value="";document.getElementById(e).focus();response=d}if(xmlHttp.responseText=="Yes"){window.open("Web/dUserProfile.aspx","_self");response=true}}};xmlHttp.open("GET","Web/MoveProfiles.aspx?ActionFor=CheckExitingUser&UserName="+txtUName+"&Pws="+txtPwd,true);xmlHttp.send(null)}return response}var Lookingfor="",AgeFrom="",AgeTo="",religion="",Caste="",mstatus="",country="",mWithPhoto="",flag=false;function ValidatePageSearchControl(){var f="Doesn't Matter",e=true,b="",a="lblMsg",d=false;flag=d;document.getElementById(a).innerHTML=b;Lookingfor=document.getElementById("Lookingfor").value;AgeFrom=document.getElementById("AgeFrom").value;AgeTo=document.getElementById("AgeTo").value;religion=document.getElementById("religion").value;Caste=document.getElementById("ddlCaste").value;mstatus=document.getElementById("mstatus").value;country=document.getElementById("country").value;mWithPhoto=document.getElementById("ChkWithPhoto").checked;if(Lookingfor==b){document.getElementById(a).innerHTML=b;document.getElementById(a).innerHTML="Please select bridegroom.";flag=e;return d}if(AgeFrom==b){document.getElementById(a).innerHTML=b;document.getElementById(a).innerHTML="Please select minimum age range.";flag=e;return d}if(AgeTo==b){document.getElementById(a).innerHTML=b;document.getElementById(a).innerHTML="Please select maximum age range.";flag=e;return d}var g=AgeTo-AgeFrom;if(g>10){document.getElementById(a).innerHTML=b;document.getElementById(a).innerHTML="Age range should be 10 years.";flag=e;return d}if(g<0){document.getElementById(a).innerHTML=b;document.getElementById(a).innerHTML="Invalid From and To age range.";flag=e;return d}if(flag==d){var c=b;c="select * From pProfileDetails where Gender='"+Lookingfor+"'";c+=" And Age  between "+AgeFrom+" and "+AgeTo;c+=" And ShowProfile='Yes' And DeleteFlag=0 And HideFlag=0";c+=" And  ShowProfileTo in ('All')";if(mWithPhoto==e)c+=" And ProfileId in(select ProfileId From  MPhotoDetail where UPhoto > 0 )";if(mstatus!=f)c+=" And MStatus='"+mstatus+"'";if(country!=f)c+=" And RCountryName='"+country+"'";if(religion!=f)c+=" And  Religion='"+religion+"'";if(Caste!=f)c+=" And  Caste='"+Caste+"'";document.getElementById("HiddenField1").value=c}}function FillCasteBasedOnReligionLogoutPage(){var b=document.getElementById("religion").value;if(b!=""){var a=loadXmlHttp();a.onreadystatechange=function(){var b="CasteDiv";if(a.readyState==4)if(a.status==200)if(a.responseText!=""){document.getElementById(b).innerHTML="";document.getElementById(b).innerHTML=a.responseText;document.getElementById(b).style.display="block"}};a.open("GET","FillSearchdata.aspx?SelectOption=Religion&fillForName="+b,true);a.send(null)}}var OtherIdResponse=false;function openpageLogoutPage(){var c="lblPIDErrormessage",b="txtOtherProfileId",d=document.getElementById(b).value;if(d==""){document.getElementById(c).innerHTML="Please enter Profile ID";document.getElementById(b).value="";document.getElementById(b).focus;return false}else{var a=loadXmlHttp();a.onreadystatechange=function(){if(a.readyState==4)if(a.status==200){if(a.responseText=="No"){document.getElementById(c).innerHTML="Please enter valid Profile Id";document.getElementById(b).value="";document.getElementById(b).focus;OtherIdResponse=false}var d="";d=a.responseText.split(";");if(d[0]=="Yes"){window.open("dOtherProfile.aspx?OtherPId="+d[1],"_parent");OtherIdResponse=false}}};a.open("GET","MoveProfiles.aspx?ActionFor=Open Other Profile&RequestId="+d,true);a.send(null)}return OtherIdResponse}var txtUName,txtPwd,pFlage,xmlHttp,response=false;function ValidatePageUserNameEmailLogoutPage(){var c="lblMsgEU",b="#",f="txtPwd",e="txtUName",d=false,g=d;txtUName=document.getElementById(e).value;txtPwd=document.getElementById(f).value;var a=0;a=txtUName.indexOf(b);while(a>0){txtUName=txtUName.replace(b,"%23");a=txtUName.indexOf(b)}a=0;a=txtPwd.indexOf(b);while(a>0){txtPwd=txtPwd.replace(b,"%23");a=txtPwd.indexOf(b)}if(txtUName==""||txtUName=="User Id"){document.getElementById(c).innerHTML="";document.getElementById(c).innerHTML="Please specify valid User ID.";document.getElementById(e).focus();return d}else if(txtPwd==""||txtPwd=="Password"){document.getElementById(c).innerHTML="";document.getElementById(c).innerHTML="Please specify Password.";document.getElementById(f).focus();return d}else{xmlHttp=loadXmlHttp();xmlHttp.onreadystatechange=function(){if(xmlHttp.readyState==4)if(xmlHttp.status==200){if(xmlHttp.responseText=="No"){document.getElementById(c).innerHTML="";document.getElementById(c).innerHTML="Invalid User ID or Password. Try again.";document.getElementById(e).value="";document.getElementById(f).value="";document.getElementById(e).focus();response=d}if(xmlHttp.responseText=="Yes"){window.open("dUserProfile.aspx","_self");response=true}}};xmlHttp.open("GET","MoveProfiles.aspx?ActionFor=CheckExitingUser&UserName="+txtUName+"&Pws="+txtPwd,true);xmlHttp.send(null)}return response}function doLogout(){history.go(1)};
