var showmore_time=0;var pos_arr=new Array();var start_x=start_y=0;var user_server_IP="";var aImages=new Array();var base_url="http://www.123greetings.com";var tellafrnd_flag=false;$.ajaxSetup({cache:true});var scroller_html="";$(".searchbox").val("Search Here or Enter Card No");$(".searchbox").focus(function(){if(this.value==this.defaultValue){this.value=""}});$(".searchbox").blur(function(){if(this.value==""){this.value=this.defaultValue}});$("form:first").submit(function(){return($("#query").val()!="Search Here or Enter Card No"&&$("#query").val().search(/\S/)!=-1)});$(".search .button").click(function(){if($("#query").val()!="Search Here or Enter Card No"&&$("#query").val().search(/\S/)!=-1){$("form:first").submit()}return false});$(".more").mouseover(showMore);$(".more").mouseout(function(){closeMore($(this).attr("class"))});$(".book").click(showBookmark);jQuery.extend({min:function(a,b){return a<b?a:b},max:function(a,b){return a>b?a:b},isEven:function(a){return(!(a%2))},trimChars:function(d,c){c=c||"\\s";return($.trim(d).replace(new RegExp("^["+c+"]+","g"),"")).replace(new RegExp("["+c+"]+$","g"),"")},removeChars:function(e,f,c){return(e.replace(new RegExp(f,"g"),c))},HTML_encode:function(b){return($("<div/>").text(b).html())},HTML_decode:function(b){return($("<div/>").html(b).text())},img_preload:function(b){$.each(b,function(a,d){jQuery("<img>").attr("src",d)})}});function showMore(){var b=$(this).attr("class");if(!showmore_time){$("."+b+"-content").bind("mouseover",clearCloseMore);$("."+b+"-content").bind("mouseout",function(){closeMore(b)});$("."+b+"-content").show("fast")}else{clearTimeout(showmore_time)}}function closeMore(b){showmore_time=setTimeout(function(){$("."+b+"-content").hide();$("."+b+"-content").unbind("mouseover");$("."+b+"-content").unbind("mouseout");showmore_time=0},1000)}function clearCloseMore(){if(showmore_time){clearTimeout(showmore_time)}}function HP_scroller(){var n=[3,5,(jQuery.browser.msie&&jQuery.browser.version=="6.0")?138:138,false];var p=$(this).attr("class").toLowerCase();var o=$(this).parent().parent().parent().attr("id");var j=$("#"+o+" > ul").position();var q=$("#"+o+" .scroll-nav > a").index($("#"+o+" .scroll-nav > a").filter(".on"));if(p=="prev"){var m=(q)?q-1:n[1]-1}else{if(p=="next"){var m=(q<n[1]-1)?q+1:0}else{var m=$("#"+o+" .scroll-nav > a").index(this)}}var a=-(m*n[0]*n[2]);$("#"+o+" .scroll-nav > a:eq("+q+")").removeClass("on");$("#"+o+" .scroll-nav > a:eq("+m+")").addClass("on");var k=function(){var b=window[o+"_hp"];var c=new Array();m*=n[0];while($("#"+o+" > ul > *").length<15){if((b[m+l].CNUM)<800000){$("#"+o+" > ul").append("<li></li>")}}$("#"+o+" > ul > *:gt("+(m-1)+"):lt(3)").each(function(d){var e,f;if($(this).children().length<2){f=b[m+d].CNUM<800000?m+d:1;e=(typeof b[f].CT_T=="undefined")?b[f].CT:b[f].CT_T;e=$.HTML_decode(e);if(jQuery.browser.msie){$(this).append('<a href="/aff-bin/card/'+uid+"/"+b[f].CNUM+'" title="'+e+'"><div style="margin:0;"><span style="width: 100px; height:100px;margin:0px 0px 0px 0px; display:block; cursor:pointer; filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=\'http://i.123g.us'+b[f].CTH+"',sizingMethod='scale');\"></span></div></a>")}else{$(this).append('<a href="/aff-bin/card/'+uid+"/"+b[f].CNUM+'" title="'+e+'"><img src="http://i.123g.us'+b[f].CTH+'" alt="'+e+'" id="img_'+b[f].CNUM+'" /></a>')}$(this).append('<a href="/aff-bin/card/'+uid+"/"+b[f].CNUM+'">'+e+"</a>");$(this).children(":eq(0)").remove()}c.push("http://i.123g.us"+b[m+d].CTH)});$.img_preload(c)};$("#"+o+" > ul").animate({left:a+"px"},1000,function(){if(!n[3]){$.getScript("http://x.123g.us/json/hp_scroller.js",function(){n[3]=true;k()})}else{k()}});return false}function checkEmail_site(i){var h=/^([a-zA-Z0-9_.-])+@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;var j=/^\s.*/;var g=/.*\s$/;var e=true;if(i.charAt(i.length-1)=="."){e=false}if(j.test(i)){e=false}if(g.test(i)){e=false}if(!h.test(i)||i.match(/@-/)||i.match(/-\./)){e=false}else{e=true}return(e)}function showBookmark(){window.open("http://www.addthis.com/bookmark.php?v=10&pub=sharad123&url="+encodeURIComponent(location.href)+"&title="+encodeURIComponent(document.title),"addthis","scrollbars=yes,menubar=no,width=620,height=520,resizable=yes,toolbar=no,location=no,status=no,screenX=200,screenY=100,left=200,top=100");return false}function embedswf_swfobject(j,h,g,f,i){$("#"+i).css({height:f});swfobject.embedSWF(j,i,g,f,"8.0.0","http://c.123g.us/flash/expressInstall.swf",false,{menu:"false",allowscriptaccess:"always",wmode:"transparent",quality:"high",flashvars:h.replace(/&amp;/g,"&")},{id:"swf_"+i,name:"swf_"+i})};