
$(document).ready(function(){var optionsLogin={target:'#message',beforeSubmit:valForm,success:showResponseLogin};$("#cartsummary, .shopbag").click(function(){$("#viewcart").html("<h1>Loading.... Please wait a sec!");$("#viewcart").load("/cart/cartcomp.asp");$("#viewcart").dialog("open");return false;});$("#viewcart").dialog({bgiframe:true,autoOpen:false,height:480,width:750,modal:true,title:"Shopping Cart Items",close:function(event,ui){if($('#isCCDelete').val()==1){window.location.reload();}}});$("#logindialog").dialog({bgiframe:true,autoOpen:false,height:210,width:345,modal:true,title:"Login",buttons:{Login:function(){$("#signinform").ajaxSubmit(optionsLogin);},Cancel:function(){$(this).dialog('close');}}});$("#logindialog").keypress(function(e){if((e.which&&e.which==13)||(e.keyCode&&e.keyCode==13)){$("#signinform").ajaxSubmit(optionsLogin);return true;}else{return true;}});$("#userdlg").dialog({bgiframe:true,autoOpen:false,height:360,width:360,modal:true,title:"My Astrology Details",buttons:{Ok:function(){$(this).dialog('close');}}});$("#showuserdetail").click(function(){$("#userdlg").load("/include/mydetails.asp");$("#userdlg").dialog('open');});$("#dlgsearch").dialog({bgiframe:true,autoOpen:false,height:610,width:1000,modal:false,title:"Astroved Google Search"});$("#dlgviewlgimg").dialog({bgiframe:true,autoOpen:false,height:690,width:715,modal:false,title:"Title",buttons:{Close:function(){$(this).dialog('close');}}});$(".viewlgimg").click(function(){$("#dlgviewlgimg").dialog('option','title',$(this).attr('title'))
$("#dlgviewlgimg").html("<h1>Loading.... Please wait a sec!");$("#dlgviewlgimg").html("<div class='dllgimg'><img src='"+$(this).attr('href')+"'></div>");$("#dlgviewlgimg").dialog("open");return false;});$("#container-1").tabs();$("#vertab").tabs().addClass('ui-tabs-vertical ui-helper-clearfix');$("#vertab li").removeClass('ui-corner-top').addClass('ui-corner-left');$("#vertab ul").removeClass('ui-widget-header');$("#container-1 ul").removeClass('ui-widget-header').removeClass('ui-corner-all');$("#container-1").removeClass('ui-widget-content').removeClass('ui-corner-all');$("#container-1 ul li").removeClass('ui-corner-top');$("#vertab ul").removeClass('ui-widget-headercus').removeClass('ui-corner-all');$("#vertab").removeClass('ui-widget-content');$("#vertab .vertabcon").removeClass('ui-corner-bottom').addClass('ui-widget-right');var contactBoxy=null;$('.contact_us').click(function(){var boxy_content;boxy_content+="<div style=\"width:400px; height:400px \"><form id=\"feedbacked\">";boxy_content+="<p>Subject<br /><select name=\"subject\" id=\"subject\"><option value=\"Site Presentation\"> Site Presentation</option><option value=\"Site Information\"> Site Information </option><option value=\"Ease Of Use\">Ease Of Use</option><option value=\"Astroved Reports\">Astroved Reports</option><option value=\"Overall Ranking\">Overall Ranking</option></select></p><p>Your name:<br /><input type=\"text\" name=\"your_name\" id=\"your_name\" size=\"41\" /></p><p>Your email:<br /><input type=\"text\" name=\"your_email\" id=\"your_email\" size=\"41\" /></p><p>Comment:<br /><textarea name=\"comment\" id=\"comment\" cols=\"37\" rows=\"5\"></textarea></p><br /><input type=\"submit\" name=\"submit\" value=\"Send >>\" />";boxy_content+="</form></div>";contactBoxy=new Boxy(boxy_content,{title:"Send feedback",draggable:false,modal:true,behaviours:function(c){c.find('#feedbacked').submit(function(){Boxy.get(this).setContent("<div style=\"width: 400px; height: 400px\">Sending...</div>");$.post("/include/suggest.asp",{subject:c.find("select[name='subject']").val(),your_email:c.find("input[name='your_email']").val(),your_name:c.find("input[name='your_name']").val(),comment:c.find("#comment").val()},function(data){contactBoxy.setContent("<div style=\"width: 400px; height: 400px\">"+data+"</div>");});return false;});}});return false;});});function showResponseLogin(responseText,statusText){$("#message").html(responseText);}
function closeCartDialog(){$("#viewcart").dialog("close");}
function gotoproducts(){window.location.href='/services/offerings/planetary';}
function redirectHistory(){history.go(-2);}
function valForm(formData,jqForm,options){if($("#AccountID").val()==""){$(options["target"]).text("Please enter username!").show().fadeOut(1000).fadeIn(1000);$("#AccountID").focus();return false;}
if($("#Password").val()==""){$(options["target"]).text("Please enter password!").show().fadeOut(1000).fadeIn(1000);$("#Password").focus()
return false;}
return true;}
var flag=true;function mapsLoaded(){var searchControl=new google.search.SearchControl();searchControl.setLinkTarget(searchControl.LINK_TARGET_SELF);searchControl.setResultSetSize(google.search.Search.LARGE_RESULTSET);var siteSearch=new GwebSearch();siteSearch.setUserDefinedLabel("Astroved.com");siteSearch.setUserDefinedClassSuffix("siteSearch");siteSearch.setSiteRestriction("astroved.com");var drawOptions=new google.search.DrawOptions();drawOptions.setInput(document.getElementById('query_input'));var options=new GsearcherOptions();options.setExpandMode(GSearchControl.EXPAND_MODE_OPEN);options.setRoot(document.getElementById("searchresult"));searchControl.addSearcher(siteSearch,options);searchControl.draw('searchcontrol',drawOptions);GSearch.getBranding(document.getElementById("googlebrand"));}
function loadMaps(){google.load("search","1",{"callback":mapsLoaded});}
function initLoader()
{if(flag){var script=document.createElement("script");if(document.location.protocol=='https:'){script.src="https://www.google.com/jsapi?key=ABQIAAAAoaqzZrdbwIFiQIIpWxDWARSIdR4F-3-vczd9RRLo5-PFVp7ncRTC10S3Fvl5RSvJQcaMjg4h0kAT3g&callback=loadMaps";}
else{script.src="http://www.google.com/jsapi?key=ABQIAAAAoaqzZrdbwIFiQIIpWxDWARSIdR4F-3-vczd9RRLo5-PFVp7ncRTC10S3Fvl5RSvJQcaMjg4h0kAT3g&callback=loadMaps";}
script.type="text/javascript";document.getElementsByTagName("head")[0].appendChild(script);}
flag=false;}
function getSearch(){initLoader();$("#query_input").delay(1000,function(){$("#query_input").trigger('keyup');});$("#dlgsearch").dialog("open");}
jQuery.fn.delay=function(time,func){this.each(function(){setTimeout(func,time);});return this;};function showSubContent(id,noOfId,preFixName,className){hideShowSubContent(noOfId,preFixName,className);document.getElementById(id).className=document.getElementById(id).className+" sel"+className;opacity(id,5,100,1000);}
function hideShowSubContent(noOfId,preFixName,className){for(i=1;i<=noOfId;i++){document.getElementById(preFixName+i).className=className;}}
function opacity(id,opacStart,opacEnd,millisec){var speed=Math.round(millisec/100);var timer=0;if(opacStart>opacEnd){for(i=opacStart;i>=opacEnd;i--){setTimeout("changeOpac("+i+",'"+id+"')",(timer*speed));timer++;}}else if(opacStart<opacEnd){for(i=opacStart;i<=opacEnd;i++)
{setTimeout("changeOpac("+i+",'"+id+"')",(timer*speed));timer++;}}}
function changeOpac(opacity,id){var object=document.getElementById(id).style;object.opacity=(opacity/100);object.MozOpacity=(opacity/100);object.KhtmlOpacity=(opacity/100);object.filter="alpha(opacity="+opacity+")";}
$(document).ready(function(){$("#query_input").keypress(function(e){code=e.keyCode?e.keyCode:e.which;if(code.toString()==13){getSearch();}});});