font_replace(); $(document).ready(function(){ notices_ticker(); load_polls(); search_box(); cal(); //fix_features(); }) function font_replace() { Cufon.replace('.f_h2')('.features h3'); } function fix_features() { $('.features .summary').each(function(){ height = $(this).height(); $(this).html('My Height Is '+height); //if(height>50) alert('found'); }) } /* send to friend */ function refer_a_friend(url,title) { page = base_url + 'index.php?template=idl&c=friend&title='+title+'&url='+url open_window(page,600,400,'friend'); } /* popup window */ _w = null; function open_window(path,width,height,win) { w = window.screen.availWidth; h = window.screen.availHeight; posL = (w-width)*.5; posT = (h-height)*.5; if(_w && _w.open){ _w.close(); } _w = window.open(path,win,'width='+width+',height='+height+',top='+posT+',left='+posL+',menubar=0,location=0,toolbar=0,personalbar=0,status=0,scrollbars=1,allowresize=1,dependent=1,resizable=1'); } /* cal */ function cal() { $('.calendar .toggle').click(function(){ rel = $(this).attr('rel'); if($(this).hasClass('closed')) { $(this).removeClass('closed').addClass('open'); $('#calendar_'+rel+' .small').hide(); $('#calendar_'+rel+' .big').show(); } else { $(this).removeClass('open').addClass('closed'); $('#calendar_'+rel+' .small').show(); $('#calendar_'+rel+' .big').hide(); } return false; }); $('.calendar .keyword .input').focus(function(){ if($(this).val()=='calendar search') $(this).val('') /// alert($(this).val()); }); } function load_cal(sidebar_id) { var myDate=new Date(); $('#calendar_'+sidebar_id+' .cal').load(site_url+'events/cal/'+myDate.getFullYear()+'/'+(myDate.getMonth()+1)+'/'+sidebar_id); } function change_month(year,month,sidebar_id) { $('#calendar_'+sidebar_id+' .cal').load(site_url+'events/cal/'+year+'/'+month+'/'+sidebar_id); // createCookie('cal_date','events/cal/'+year+'/'+month,0); return false; } /* search */ function search_box() { $('.search .input').focus(function(){ if($(this).val()=='search indesignlive.com') $(this).val('') /// alert($(this).val()); }); $('.search .input').blur(function(){ // if($(this).val()=='') // $(this).val('search indesignlive.com') }); } /* polls */ var poll_ids = new Array(); var poll_divs = new Array(); function queue_poll(div_id,poll_id) { poll_ids.push(poll_id); poll_divs.push(div_id); } function load_polls() { for(i=0;i