var mt;mt={blog:{id:1,url:'http%3A%2F%2Fwww.alohatechsupport.net%2Fwebdesignmaui%2F',staticWebPath:'http://www.alohatechsupport.net/webdesignmaui-mt/mt-static/',adminScript:'mt.cgi',signInLink:'http://www.alohatechsupport.net/webdesignmaui-mt/mt-cp.cgi?__mode=login&blog_id=1',signOutLink:'http://www.alohatechsupport.net/webdesignmaui-mt/mt-cp.cgi?__mode=logout&static=0',comments:{script:'http://www.alohatechsupport.net/webdesignmaui-mt/mt-comments.cgi',armor:'8df34e4442c85afb135999b7b8470c96d4647171',accepted:1,captchaFields:'
Captcha:
'},community:{script:'http://www.alohatechsupport.net/webdesignmaui-mt/mt-cp.cgi',ifAnonymousRecommendAllowed:1},pings:{accepted:1},registration:{required:1,allowed:1}}};mt.blog.phrase={fileRequired:'Please select a file to post.',invalidFileType:'You selected an unsupported file type.',relativeDate:{momentsAgo:'moments ago',minutesAgo:'1 minute ago',minutesAgoPlural:'2 minutes ago',hoursAgo:'1 hour ago',hoursAgoPlural:'2 hours ago',daysAgo:'1 day ago',daysAgoPlural:'2 days ago'},edit:'Edit',signingIn:' Signing in now...<\/a\>',commenter:{auth:'\ Sign in to comment.\<\/a\> ',authAnonyous:'\Sign in\<\/a\> to comment, or comment anonymously.',authBanned:'You do not have permission to comment on this blog. (\ sign out\<\/a\>)',authSuccess:'Thanks for signing in, __NAME__. (\ sign out\<\/a\>)',sessionExpired:'Your session has expired. Please sign in again to comment.',replyingTo:'Replying to \ comment from __AUTHOR__\<\/a\>'}};var mtCookieName = "mt_blog_user";var mtCookieDomain = ".alohatechsupport.net";var mtCookiePath = "/";var mtCookieTimeout = 14400;function initClickHandlers(){$('.favtog').click(function(){var id=$(this).attr('id').replace("favtog","");if($(this).hasClass('scored')){mtMarkScore(id,0,'scored','scored');}else{mtMarkScore(id,1,'scored','scored');}});$('.unpublish').click(function(){var id=$(this).attr('id').replace("unpublish","");mtUnpublishPost(id);});}
function mtUnpublishPost(obj_id){var el=$('#unpublish'+obj_id);if(!el)return false;var u=mtGetUser();if(!u||!u.name)return;$.ajax({type:"POST",url:mt.blog.community.script,data:'__mode=unpublish&jsonp=mtUnpublishPost_cb&id='+obj_id+'&magic_token='+u.sid,success:function(r){var entry=$('#entry-'+obj_id);if(entry.size())entry.hide("slow");$('.comment-entry-'+obj_id).each(function(){$(this).hide("slow");});}});}
function mtMarkScore(obj_id,score,pending,complete){var el=$('#favtog'+obj_id);if(!el)return false;if(score){$(el).addClass(pending);}else{$(el).removeClass(pending);};$.ajax({type:"POST",url:mt.blog.community.script,data:'__mode=vote&ow=1&f=sum&jsonp=mtMarkScore_cb&id='+obj_id+'&score='+score,success:function(r){var sum=eval(r);if(sum==undefined)sum=0;mtMarkScoreResponse(obj_id,score,sum,pending,complete);}});}
function mtMarkScore_cb(s_hash){for(var id in s_hash){return s_hash[id].sum;}}
function mtMarkScoreResponse(obj_id,score,count,pending,complete){var el=$('#favtog'+obj_id);if(!el.size())return false;if(score){$(el).removeClass(pending).addClass(complete).html(count+'');}else{$(el).removeClass(pending).removeClass(complete).html(count+'');};}
function mtUpdateScores(){var u=mtGetUser();if(!mt.blog.community.ifAnonymousRecommendAllowed&&!u)return false;var entry_ids='';var scores=$('.favtog');if(scores.size()){for(var i=0;i ');$.get(url,query,function(result){$('.actions').replaceWith(result);window.scroll(0,0);initEntryHover();initClickHandlers();mtUpdateScores();});return false;}
function script_follow(id){var u=mtGetUser();if(!u||!u.name)return;$.ajax({type:"POST",url:mt.blog.community.script,data:'__mode=follow&id='+id+'&magic_token='+u.sid+'&jsonp=follow',success:function(r){eval(r);}});$('#following_'+id+'_else').hide();$('#following-status').html(' ');}
function script_leave(id){var u=mtGetUser();if(!u||!u.name)return;$.ajax({type:"POST",url:mt.blog.community.script,data:'__mode=leave&id='+id+'&magic_token='+u.sid+'&jsonp=leave',success:function(r){eval(r);}});$('#following_'+id).hide();$('#following-status').html(' ');}
function follow(user_info){conditional_block(true,'following_'+user_info['id']);$('#following-status').html('');}
function leave(user_info){conditional_block(false,'following_'+user_info['id']);$('#following-status').html('');}
function conditional_block(cond,id){var true_block=$('#'+id);var false_block=$('#'+id+'_else');if(cond){$(false_block).hide();if($(true_block).size()){var display=$(true_block).attr('mt:display_style');if(!display&&$(false_block).size())
display=$(false_block).attr('mt:display_style');if(!display)display='';$(true_block).show();}}else{$(true_block).hide();if($(false_block).size()){var display=$(false_block).attr('mt:display_style');if(!display&&$(true_block).size())
display=$(false_block).attr('mt:display_style');if(!display)display='';$(false_block).show();}}}
function mtHide(id){var el=(typeof id=="string")?document.getElementById(id):id;if(el)el.style.display='none';}
function mtShow(id){var el=(typeof id=="string")?document.getElementById(id):id;if(el)el.style.display='block';}
function mtAttachEvent(eventName,func){var onEventName='on'+eventName;var old=window[onEventName];if(typeof old!='function')
window[onEventName]=func;else{window[onEventName]=function(evt){old(evt);return func(evt);}}}
function mtFireEvent(eventName,param){var fn=window['on'+eventName];if(typeof fn=='function')return fn(param);return;}
function mtRelativeDate(ts,fds){var now=new Date();var ref=ts;var delta=Math.floor((now.getTime()-ref.getTime())/1000);var str;if(delta<60){str=mt.blog.phrase.relativeDate.momentsAgo;}else if(delta<=86400){var hours=Math.floor(delta/3600);var min=Math.floor((delta%3600)/60);if(hours==1)
str=mt.blog.phrase.relativeDate.hoursAgo;else if(hours>1)
str=mt.blog.phrase.relativeDate.hoursAgoPlural.replace(/2/,hours);else if(min==1)
str=mt.blog.phrase.relativeDate.minutesAgo;else
str=mt.blog.phrase.relativeDate.minutesAgoPlural.replace(/2/,min);}else if(delta<=604800){var days=Math.floor(delta/86400);var hours=Math.floor((delta%86400)/3600);if(days==1)
str=mt.blog.phrase.relativeDate.daysAgo;else if(days>1)
str=mt.blog.phrase.relativeDate.daysAgoPlural.replace(/2/,days);else if(hours==1)
str=mt.blog.phrase.relativeDate.hoursAgo;else
str=mt.blog.phrase.relativeDate.hoursAgoPlural.replace(/2/,hours);}
return str?str:fds;}
function mtEditLink(entry_id,author_id){var u=mtGetUser();if(!u)return;if(!entry_id)return;if(!author_id)return;if(u.id!=author_id)return;var link=' '+mt.blog.phrase.edit+' ';document.write(link);}
function mtCommentFormOnFocus(){mtShowCaptcha();}
var mtCaptchaVisible=false;function mtShowCaptcha(){var u=mtGetUser();if(u&&u.is_authenticated)return;if(mtCaptchaVisible)return;var div=document.getElementById('comments-open-captcha');if(div){div.innerHTML=mt.blog.comments.captchaFields;mtCaptchaVisible=true;}}
var is_preview;var user;function mtSetUser(u){if(u){user=u;mtSaveUser();mtFireEvent('usersignin');}}
function mtEscapeJS(s){s=s.replace(/'/g,"'");return s;}
function mtUnescapeJS(s){s=s.replace(/'/g,"'");return s;}
function mtBakeUserCookie(u){var str="";if(u.name)str+="name:'"+mtEscapeJS(u.name)+"';";if(u.url)str+="url:'"+mtEscapeJS(u.url)+"';";if(u.email)str+="email:'"+mtEscapeJS(u.email)+"';";if(u.is_authenticated)str+="is_authenticated:'1';";if(u.profile)str+="profile:'"+mtEscapeJS(u.profile)+"';";if(u.userpic)str+="userpic:'"+mtEscapeJS(u.userpic)+"';";if(u.sid)str+="sid:'"+mtEscapeJS(u.sid)+"';";str+="is_trusted:'"+(u.is_trusted?"1":"0")+"';";str+="is_author:'"+(u.is_author?"1":"0")+"';";str+="is_banned:'"+(u.is_banned?"1":"0")+"';";str+="can_post:'"+(u.can_post?"1":"0")+"';";str+="can_comment:'"+(u.can_comment?"1":"0")+"';";str=str.replace(/;$/,'');return str;}
function mtUnbakeUserCookie(s){if(!s)return;var u={}
var m;while(m=s.match(/^((name|url|email|is_authenticated|profile|userpic|sid|is_trusted|is_author|is_banned|can_post|can_comment):'([^']+?)';?)/)){s=s.substring(m[1].length);if(m[2].match(/^(is|can)_/))
u[m[2]]=m[3]=='1'?true:false;else
u[m[2]]=mtUnescapeJS(m[3]);}
if(u.is_authenticated){u.is_anonymous=false;}else{u.is_anonymous=true;u.can_post=false;u.is_author=false;u.is_banned=false;u.is_trusted=false;}
return u;}
function mtGetUser(){if(!user){var cookie=mtGetCookie(mtCookieName);if(!cookie)return;user=mtUnbakeUserCookie(cookie);if(!user){user={}
user.is_anonymous=true;user.can_post=false;user.is_author=false;user.is_banned=false;user.is_trusted=false;}}
return user;}
var mtFetchedUser=false;if(mt.blog.id){function mtFetchUser(cb){if(!cb)cb='mtSetUser';if((cb=='mtSetUser')&&mtGetUser()){var url=document.URL;url=url.replace(/#.+$/,'');url+='#comments-open';location.href=url;}else{mtFetchedUser=true;var script=document.createElement('script');var ts=new Date().getTime();script.src=mt.blog.comments.script+'?__mode=session_js&blog_id='+mt.blog.id+'&jsonp='+cb+'&ts='+ts;(document.getElementsByTagName('head'))[0].appendChild(script);}}}
function mtRememberMeOnClick(b){if(!b.checked)
mtClearUser(b.form);return true;}
if(mt.blog.id){var mtRequestSubmitted=false;function mtCommentOnSubmit(f){if(!mtRequestSubmitted){mtRequestSubmitted=true;if(f.armor)
f.armor.value=mt.blog.comments.armor;if(f.bakecookie&&f.bakecookie.checked)
mtSaveUser(f);if(f.preview_button)f.preview_button.disabled=true;if(f.post)f.post.disabled=true;var u=mtGetUser();if(!is_preview&&(u&&u.is_authenticated)){mtFetchedUser=false;mtFetchUser('mtCommentSessionVerify');return false;}
return true;}
return false;}
function mtCommentSessionVerify(app_user){var u=mtGetUser();var f=document['comments_form'];if(u&&app_user&&app_user.sid&&(u.sid==app_user.sid)){f.submit();}else{alert(mt.blog.phrase.commenter.sessionExpired);mtClearUser();mtFireEvent('usersignin');if(mt.blog.registration.required){mtShow('comments-form');mtHide('comments-open-footer');}}}
function mtUserOnLoad(){var u=mtGetUser();if(document.getElementById('comments-form')){if(u&&u.is_authenticated){mtShow('comments-form');mtHide('comments-open-data');if(mtCaptchaVisible)
mtHide('comments-open-captcha');}else{if(mt.blog.registration.required){mtHide('comments-form');}}
if(u&&u.is_banned)
mtHide('comments-form');if(is_preview)
mtShowCaptcha();else
mtShowGreeting();var cf=document['comments_form'];if(cf){if(u&&u.is_anonymous){if(u.email)cf.email.value=u.email;if(u.name)cf.author.value=u.name;if(u.url)cf.url.value=u.url;if(cf.bakecookie)
cf.bakecookie.checked=u.name||u.email;}else{if(u&&u.sid&&cf.sid)
cf.sid.value=u.sid;}
if(cf.post.disabled)
cf.post.disabled=false;if(cf.preview_button.disabled)
cf.preview_button.disabled=false;mtRequestSubmitted=false;}}}}
if(mt.blog.id){function mtEntryOnLoad(){if(!mt.blog.pings.accepted)
mtHide('trackbacks-info');if(!mt.blog.comments.accepted)
mtHide('comments-open');mtFireEvent('usersignin');}
function mtEntryOnUnload(){if(mtRequestSubmitted){var cf=document['comments_form'];if(cf){if(cf.post&&cf.post.disabled)
cf.post.disabled=false;if(cf.preview_button&&cf.preview_button.disabled)
cf.preview_button.disabled=false;}
mtRequestSubmitted=false;}
return true;}
mtAttachEvent('usersignin',mtUserOnLoad);}
function mtSignIn(){var doc_url=document.URL;doc_url=doc_url.replace(/#.+/,'');var url=mt.blog.signInLink;if(is_preview){if(document['comments_form']){var entry_id=document['comments_form'].entry_id.value;url+='&entry_id='+entry_id;}else{url+='&return_url='+mt.blog.url;}}else{url+='&return_url='+encodeURIComponent(doc_url);}
mtClearUser();location.href=url;}
function mtSignInOnClick(sign_in_element){var el;if(sign_in_element){el=document.getElementById(sign_in_element);if(!el)
el=document.getElementById('comment-form-external-auth');}
if(el)
el.innerHTML=mt.blog.phrase.signingIn+' ';mtClearUser();mtFetchUser('mtSetUserOrLogin');return false;}
function mtSetUserOrLogin(u){if(u&&u.is_authenticated){mtSetUser(u);}else{mtSignIn();}}
function mtSignOut(entry_id){mtClearUser();var doc_url=document.URL;doc_url=doc_url.replace(/#.+/,'');var url=mt.blog.signOutLink;if(is_preview){if(document['comments_form']){var entry_id=document['comments_form'].entry_id.value;url+='&entry_id='+entry_id;}else{url+='&return_url='+mt.blog.url;}}else{url+='&return_url='+encodeURIComponent(doc_url);}
location.href=url;}
function mtSignOutOnClick(){mtSignOut();return false;}
if(mt.blog.id){function mtShowGreeting(){if(mt.blog.registration.allowed){var cf=document['comments_form'];if(!cf)return;var el=document.getElementById('comment-greeting');if(!el)
el=document.getElementById('comment-form-external-auth');if(!el)return;var eid=cf.entry_id;var entry_id;if(eid)entry_id=eid.value;var phrase;var u=mtGetUser();if(u&&u.is_authenticated){if(u.is_banned){phrase=mt.blog.phrase.commenter.authBanned;}else{var user_link;user_link=''+u.name+' ';phrase=mt.blog.phrase.commenter.authSuccess;phrase=phrase.replace(/__NAME__/,user_link);}}else{if(mt.blog.registration.required){phrase=mt.blog.phrase.commenter.auth;}else{phrase=mt.blog.phrase.commenter.authAnonyous;}}
el.innerHTML=phrase;}else{mtShowCaptcha();}}}
function mtReplyCommentOnClick(parent_id,author){mtShow('comment-form-reply');var checkbox=document.getElementById('comment-reply');var label=document.getElementById('comment-reply-label');var text=document.getElementById('comment-text');var reply_text=mt.blog.phrase.commenter.replyingTo;reply_text=reply_text.replace(/__PARENT__/,parent_id);reply_text=reply_text.replace(/__AUTHOR__/,author);label.innerHTML=reply_text;checkbox.value=parent_id;checkbox.checked=true;try{text.focus();}catch(e){}
mtSetCommentParentID();}
function mtSetCommentParentID(){var checkbox=document.getElementById('comment-reply');var parent_id_field=document.getElementById('comment-parent-id');if(!checkbox||!parent_id_field)return;var pid=0;if(checkbox.checked==true)
pid=checkbox.value;parent_id_field.value=pid;}
function mtSaveUser(f){if(is_preview)return;var u=mtGetUser();if(f&&(!u||u.is_anonymous)){if(!u){u={}
u.is_authenticated=false;u.can_comment=true;u.is_author=false;u.is_banned=false;u.is_anonymous=true;u.is_trusted=false;}
if(f.author!=undefined)u.name=f.author.value;if(f.email!=undefined)u.email=f.email.value;if(f.url!=undefined)u.url=f.url.value;}
if(!u)return;var cache_period=mtCookieTimeout*1000;if(u.is_anonymous&&f&&f.bakecookie&&f.bakecookie.checked)
cache_period=365*24*60*60*1000;var now=new Date();mtFixDate(now);now.setTime(now.getTime()+cache_period);var cmtcookie=mtBakeUserCookie(u);mtSetCookie(mtCookieName,cmtcookie,now,mtCookiePath,mtCookieDomain,location.protocol=='https:');}
function mtClearUser(){user=null;mtDeleteCookie(mtCookieName,mtCookiePath,mtCookieDomain,location.protocol=='https:');}
function mtSetCookie(name,value,expires,path,domain,secure){if(domain&&domain.match(/^\.?localhost$/))
domain=null;var curCookie=name+"="+escape(value)+
(expires?"; expires="+expires.toGMTString():"")+
(path?"; path="+path:"")+
(domain?"; domain="+domain:"")+
(secure?"; secure":"");document.cookie=curCookie;}
function mtGetCookie(name){var prefix=name+'=';var c=document.cookie;var cookieStartIndex=c.indexOf(prefix);if(cookieStartIndex==-1)
return'';var cookieEndIndex=c.indexOf(";",cookieStartIndex+prefix.length);if(cookieEndIndex==-1)
cookieEndIndex=c.length;return unescape(c.substring(cookieStartIndex+prefix.length,cookieEndIndex));}
function mtDeleteCookie(name,path,domain,secure){if(mtGetCookie(name)){if(domain&&domain.match(/^\.?localhost$/))
domain=null;document.cookie=name+"="+
(path?"; path="+path:"")+
(domain?"; domain="+domain:"")+
(secure?"; secure":"")+"; expires=Thu, 01-Jan-70 00:00:01 GMT";}}
function mtFixDate(date){var skew=(new Date(0)).getTime();if(skew>0)
date.setTime(date.getTime()-skew);}
function mtGetXmlHttp(){if(!window.XMLHttpRequest){window.XMLHttpRequest=function(){var types=["Microsoft.XMLHTTP","MSXML2.XMLHTTP.5.0","MSXML2.XMLHTTP.4.0","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP"];for(var i=0;i');if($('.actions ul').size()==0)
$('.actions').append('');$('#compose').append('
');$('#homepage-compose').submit(function(){var f=$("#homepage-compose").get(0);var post_type=f.customfield_post_type.value;$("#homepage-compose .default-value").each(function(){$(this).val('');});if(post_type=='audio'){var file_name=f.file_customfield_audio.value;if(!file_name){alert(mt.blog.phrase.fileRequired);return false;}else if(!fileExtensionCheck(file_name,['mp3'])){alert(mt.blog.phrase.invalidFileType);return false;}}else if(post_type=='photo'){var file_name=f.file_customfield_photo.value;if(!file_name){alert(mt.blog.phrase.fileRequired);return false;}else if(!fileExtensionCheck(file_name,['gif','png','jpg','jpeg'])){alert(mt.blog.phrase.invalidFileType);return false;}}
if(post_type=='audio'){f.type_customfield_audio.value='audio';f.ajax.value='';return true;}else if(post_type=='photo'){f.type_customfield_photo.value='image';f.ajax.value='';return true;}
f.ajax.value='1';$(this).ajaxSubmit({target:'#response-handler',beforeSubmit:beforeSubmit,contentType:'application/x-www-form-urlencoded; charset=utf-8',success:displayEntry});return false;});function beforeSubmit(){$('#quickpost-error').fadeOut().remove();$('#spinner, #spinner-status').fadeIn('fast').css('height',$('#compose').height());}
function displayEntry(){if($('#response-handler #quickpost-error').size()==0)
$('#homepage-compose').clearForm();$('#response-handler > li').hide().insertBefore('.actions ul:first li');$('.actions li:first').slideDown();$('#spinner, #spinner-status').fadeOut();formFieldFocus();initEntryHover();}};var flyOut;$(".userpic").hover(function(){$('.user-info').hide();var userInfo=$(this).children('.user-info');flyOut=$.timeout(function(){$(userInfo).fadeIn(200);},500);},function(){$.clear(flyOut);$(this).children('.user-info').fadeOut(200);});$(".userpic *").click(function(){$.clear(flyOut);$('.user-info').fadeOut(250);})
var commentDefaultVal=$('#comment-preview-comment .comment-content').text();var authorDefaultVal=$("#comment-author").attr('title');var authorVal=$("#comment-author").val();var emailVal=$("#comment-email").val();var urlVal=$("#comment-url").val();if(mtGetUser()){authorVal=mtGetUser().name;emailVal=mtGetUser().email;urlVal=mtGetUser().url;}
$('#comment-preview-comment .author a').text(authorDefaultVal);$('#comment-preview, #comment-preview-comment, #comments-open-text .tip').hide();$('#comments-open-data label:not(:last)').hide();$('.reply-comment-link').hide();$('#comment-preview-comment a').click(function(){return false});$('#comments-form textarea, #comments-form input').focus(function(){showPreview();});$('#comment-text').keyup(function(){updatePreview($(this),$('#comment-preview-comment .comment-content-inner'),commentDefaultVal);});$('#comment-author').keyup(function(){updatePreview($(this),$('#comment-preview-comment .author a'),authorDefaultVal);});if(mt.blog.comments.accepted)
$('#comments-list .comment').each(function(){parentID=$(this).attr('id').replace("comment-","");$('.byline',this).append(' | Reply ');});$('[@title="Reply"]').click(function(){if(mt.blog.registration.required){var u=mtGetUser();var loggedin=u&&u.is_authenticated;if(!loggedin)
mtSignInOnClick('comment-greeting');}
replyAuthor=$(this).parent().find('.author').html();$('#comment-preview-comment .reply-comment-link a span').html(replyAuthor);$('#comment-author').keyup(function(){updatePreview($(this),$('#comment-preview-comment .author a'),authorDefaultVal);});$('#comment-preview-comment .reply-comment-link').show();parent_id=this.hash.replace("#comment-","");mtReplyCommentOnClick(parent_id,replyAuthor);return false;});$('#comment-reply').click(function(){$('.reply-comment-link').toggle()});$("#comment-submit").click(function(){$('#comment-preview-comment').fadeOut(1000);$('#ajax_loading').show();$("#comment-submit, #comment-text").attr("disabled","disabled");if($('[name="armor"]')){$('[name="armor"]').val(mt.blog.comments.armor);}
$("#comments-form .default-value").each(function(){$(this).val('');});var staticVal=$('[name="static"]').val();var entryIdVal=$('[name="entry_id"]').val();var langVal=$('[name="lang"]').val();var parentIdVal=$('[name="comment_reply"]').val();var armorVal=$('[name="armor"]').val();var previewVal=$('[name="prev"]').val();var sidVal=$('[name="sid"]').val();var capthchaVal;var tokenVal;if($("#captcha_code")){capthchaVal=$('#captcha_code').val();tokenVal=$('input[name="token"]').val();}
var replyVal=$("#comment-reply").val();var textVal=$("#comment-text").val();var authorVal=$("#comment-author").val();var emailVal=$("#comment-email").val();var urlVal=$("#comment-url").val();if(mtGetUser()){authorVal=mtGetUser().name;emailVal=mtGetUser().email;if(emailVal==undefined)emailVal='';urlVal=mtGetUser().url;if(urlVal==undefined)urlVal='';}
var postData={static:staticVal,entry_id:entryIdVal,parent_id:parentIdVal,armor:armorVal,comment_reply:replyVal,author:authorVal,email:emailVal,url:urlVal,text:textVal,captcha_code:capthchaVal,token:tokenVal};
$.ajax({type:"POST",url: mt.blog.comments.script,data: postData,contentType:'application/x-www-form-urlencoded; charset=utf-8',success:function(data){$("#comments-list").html(data);$("#comment-submit, #comment-text").removeAttr("disabled");if($('#comments-list #comment-error').size()>0){$("#comment-preview-comment").fadeIn(500);$('#ajax_loading').hide();}else if($('#comments-list #comment-exclamation').size()>0){$("#comment-text").val('');$("#comment-preview-comment").fadeIn(500);$('#ajax_loading').hide();mtFireEvent('commentposted',postData);}else{$('#comment-preview-comment .comment-content-inner').html(commentDefaultVal);$("#comment-text").val('');mtFireEvent('commentposted',postData);};}});return false;});
var changeUserpic=$('#userpic-field .field-content #change-userpic');var removeUserpic=$('#userpic-field .field-content #remove-userpic');$(changeUserpic).siblings("input").hide();if(changeUserpic.size()){$(changeUserpic).click(function(){var speed=500;$(this).hide(speed).siblings("img").hide(speed).siblings("input").show(speed);removeUserpic.hide(speed);return false;})};if(removeUserpic.size()){$(removeUserpic).click(function(){var id=$('[name="id"]').val();var token=$('[name="magic_token"]').val();var postData={__mode:'remove_userpic',user_id:id,magic_token:token};$.post(mt.blog.community.script,postData,function(data){var speed=500;$(removeUserpic).hide(speed).siblings("img").hide(speed).siblings("input").show(speed);changeUserpic.hide(speed);});return false;})};initEntryHover();composeMagic();personalizeEditor();personalizeCommentForm();});function initEntryHover(){$(".asset, .actions > ul > li").hover(function(){$(this).addClass('hover');},function(){$(this).removeClass('hover');});}
var commentDefaultVal,authorDefaultVal,authorVal,emailVal,urlVal;function updatePreviewTime(){$("#comment-preview-comment .byline a .published").html($.PHPDate("M d, Y g:i A",new Date()));}
function showPreview(){var u=mtGetUser();var loggedin=u&&u.is_authenticated;if(loggedin){var fooname=mtGetUser().name;$('#comment-preview-comment .byline .author a').html(fooname);}else{$('#comment-preview-comment .byline .author a').html(authorVal);}
$("#comment-preview-comment, #comments-open-text .tip").fadeIn(500);$('#ajax_loading').hide();updatePreviewTime();}
function updatePreview(id,target,defaultVal){v=$(id).val();v=(v.length?v:defaultVal)
v=v.replace(/\n/g," ").replace(/\n\n+/g,' ').replace(/(<\/?)script/g,"$1noscript");$(target).html(v);updatePreviewTime();}
function formFieldFocus(){$('input[type=text][value=""], textarea:empty').each(function(){$(this).addClass('default-value').val($(this).attr('title'));});$("input[type=text], textarea").bind('focus',function(){if($.trim($(this).val())==$(this).attr('title'))
$(this).removeClass('default-value').val('');}).bind('blur',function(){if($.trim($(this).val())=='')
$(this).addClass('default-value').val($(this).attr('title'));});}
function ifLoggedIn(){var u=mtGetUser();if(u&&u.is_authenticated&&u.is_author)
return true;}
function setCommenter(){if(mtGetUser()){var authorVal=mtGetUser().name;var emailVal=mtGetUser().email;var urlVal=mtGetUser().url;}}
function personalizeEditor(){var u=mtGetUser();if(u&&u.is_authenticated){if(u.userpic){$("#compose-userpic img").attr({src:u.userpic,alt:u.name});}else{$("#compose-userpic img").wrap(' ');$('#compose-userpic a').append('Add userpic ');};};}
function personalizeCommentForm(){var u=mtGetUser();if(u&&u.is_authenticated){if(u.userpic){$("#commenter-userpic").attr({src:u.userpic,alt:u.name});};};}
function composeMagic(){var u=mtGetUser();if(ifLoggedIn()){if(u.can_post){$('#authenticate').fadeOut('fast');$('#compose').show();$('#compose-magic').val(u.sid);$('#cannot-post').hide();}else if(u.can_comment){$('#authenticate').hide();$('#compose').hide();$('#cannot-post').hide();}else{$('#authenticate').show();$('#compose').hide();$('#cannot-post').show();}}else if(!u){$('#authenticate').show();$('#cannot-post').hide();}else{$('#authenticate').hide();$('#compose').hide();$('#cannot-post').hide();}}
mtAttachEvent('usersignin',composeMagic);mtAttachEvent('usersignin',showPreview);$(document).ready(function(){if($.browser.mozilla){$(window).unload(function(){$(':text, textarea').val('');});}});
var tb_pathToImage="http://www.alohatechsupport.net/webdesignmaui/loading.gif";$(document).ready(function(){tb_init('a.thickbox, area.thickbox, input.thickbox');imgLoader=new Image();imgLoader.src=tb_pathToImage});function tb_init(b){$(b).click(function(){var t=this.title||this.name||null;var a=this.href||this.alt;var g=this.rel||false;tb_show(t,a,g);this.blur();return false})}function tb_show(d,f,g){try{if(typeof document.body.style.maxHeight==="undefined"){$("body","html").css({height:"100%",width:"100%"});$("html").css("overflow","hidden");if(document.getElementById("TB_HideSelect")===null){$("body").append("
");$("#TB_overlay").click(tb_remove)}}else{if(document.getElementById("TB_overlay")===null){$("body").append("
");$("#TB_overlay").click(tb_remove)}}if(tb_detectMacXFF()){$("#TB_overlay").addClass("TB_overlayMacFFBGHack")}else{$("#TB_overlay").addClass("TB_overlayBG")}if(d===null){d=""}$("body").append(" ");$('#TB_load').show();var h;if(f.indexOf("?")!==-1){h=f.substr(0,f.indexOf("?"))}else{h=f}var i=/\.jpg$|\.jpeg$|\.png$|\.gif$|\.bmp$/;var j=h.toLowerCase().match(i);if(j=='.jpg'||j=='.jpeg'||j=='.png'||j=='.gif'||j=='.bmp'){TB_PrevCaption="";TB_PrevURL="";TB_PrevHTML="";TB_NextCaption="";TB_NextURL="";TB_NextHTML="";TB_imageCount="";TB_FoundURL=false;if(g){TB_TempArray=$("a[rel="+g+"]").get();for(TB_Counter=0;((TB_Counter > "}else{TB_PrevCaption=TB_TempArray[TB_Counter].title;TB_PrevURL=TB_TempArray[TB_Counter].href;TB_PrevHTML=" < "}}else{TB_FoundURL=true;TB_imageCount="Image "+(TB_Counter+1)+" of "+(TB_TempArray.length)}}}imgPreloader=new Image();imgPreloader.onload=function(){imgPreloader.onload=null;var a=tb_getPageSize();var x=a[0]-150;var y=a[1]-150;var b=imgPreloader.width;var c=imgPreloader.height;if(b>x){c=c*(x/b);b=x;if(c>y){b=b*(y/c);c=y}}else if(c>y){b=b*(y/c);c=y;if(b>x){c=c*(x/b);b=x}}TB_WIDTH=b+30;TB_HEIGHT=c+60;$("#TB_window").append(" "+""+d+"
"+TB_imageCount+TB_PrevHTML+TB_NextHTML+"
");$("#TB_closeWindowButton").click(tb_remove);if(!(TB_PrevHTML==="")){function goPrev(){if($(document).unbind("click",goPrev)){$(document).unbind("click",goPrev)}$("#TB_window").remove();$("body").append("
");tb_show(TB_PrevCaption,TB_PrevURL,g);return false}$("#TB_prev").click(goPrev)}if(!(TB_NextHTML==="")){function goNext(){$("#TB_window").remove();$("body").append("
");tb_show(TB_NextCaption,TB_NextURL,g);return false}$("#TB_next").click(goNext)}document.onkeydown=function(e){if(e==null){keycode=event.keyCode}else{keycode=e.which}if(keycode==27){tb_remove()}else if(keycode==190){if(!(TB_NextHTML=="")){document.onkeydown="";goNext()}}else if(keycode==188){if(!(TB_PrevHTML=="")){document.onkeydown="";goPrev()}}};tb_position();$("#TB_load").remove();$("#TB_ImageOff").click(tb_remove);$("#TB_window").css({display:"block"})};imgPreloader.src=f}else{var l=f.replace(/^[^\?]+\??/,'');var m=tb_parseQuery(l);TB_WIDTH=(m['width']*1)+30||630;TB_HEIGHT=(m['height']*1)+40||440;var n=tb_getPageSize();if(TB_WIDTH>n[0]-30){TB_WIDTH=n[0]-30}if(TB_HEIGHT>n[1]-30){TB_HEIGHT=n[1]-30}ajaxContentW=TB_WIDTH-30;ajaxContentH=TB_HEIGHT-45;if(f.indexOf('TB_iframe')!=-1){urlNoQuery=f.split('TB_');$("#TB_iframeContent").remove();if(m['modal']!="true"){$("#TB_window").append("")}else{$("#TB_overlay").unbind();$("#TB_window").append("")}}else{if($("#TB_window").css("display")!="block"){if(m['modal']!="true"){$("#TB_window").append("
")}else{$("#TB_overlay").unbind();$("#TB_window").append("
")}}else{$("#TB_ajaxContent")[0].style.width=ajaxContentW+"px";$("#TB_ajaxContent")[0].style.height=ajaxContentH+"px";$("#TB_ajaxContent")[0].scrollTop=0;$("#TB_ajaxWindowTitle").html(d)}}$("#TB_closeWindowButton").click(tb_remove);if(f.indexOf('TB_inline')!=-1){$("#TB_ajaxContent").append($('#'+m['inlineId']).children());$("#TB_window").unload(function(){$('#'+m['inlineId']).append($("#TB_ajaxContent").children())});tb_position();$("#TB_load").remove();$("#TB_window").css({display:"block"})}else if(f.indexOf('TB_iframe')!=-1){tb_position();if($.browser.safari){$("#TB_load").remove();$("#TB_window").css({display:"block"})}}else{$("#TB_ajaxContent").load(f+="&random="+(new Date().getTime()),function(){tb_position();$("#TB_load").remove();tb_init("#TB_ajaxContent a.thickbox");$("#TB_window").css({display:"block"})})}}if(!m['modal']){document.onkeyup=function(e){if(e==null){keycode=event.keyCode}else{keycode=e.which}if(keycode==27){tb_remove()}}}}catch(e){}}function tb_showIframe(){$("#TB_load").remove();$("#TB_window").css({display:"block"})}function tb_remove(a){$("#TB_imageOff").unbind("click");$("#TB_closeWindowButton").unbind("click");$("#TB_window").fadeOut("fast",function(){$('#TB_window,#TB_overlay,#TB_HideSelect').trigger("unload").unbind().remove()});$("#TB_load").remove();if(typeof document.body.style.maxHeight=="undefined"){$("body","html").css({height:"auto",width:"auto"});$("html").css("overflow","")}document.onkeydown="";document.onkeyup="";return false}function tb_position(){$("#TB_window").css({marginLeft:'-'+parseInt((TB_WIDTH/2),10)+'px',width:TB_WIDTH+'px'});if(!(jQuery.browser.msie&&jQuery.browser.version<7)){$("#TB_window").css({marginTop:'-'+parseInt((TB_HEIGHT/2),10)+'px'})}}function tb_parseQuery(a){var b={};if(!a){return b}var c=a.split(/[;&]/);for(var i=0;i 0) {
var currentItemId = 'gallery-item-' + currentItem;
var prevItemId = 'gallery-item-' + prevItemNumber;
var currentItemObj = document.getElementById(currentItemId);
var prevItemObj = document.getElementById(prevItemId);
$(currentItemObj).fadeOut(400, function() {
$(prevItemObj).fadeIn(400);
});
currentItem = prevItemNumber;
document.getElementById('showcase-next').className = 'active';
if (currentItem == 1) {
document.getElementById('showcase-prev').className = 'inactive';
} else {
document.getElementById('showcase-prev').className = 'active';
}
}
};
$(function(){
$('div.view').hide();
$('div.slide').toggle(function() {
$(this).siblings('div.view').fadeIn('slow');
}, function() {
$(this).siblings('div.view').fadeOut('fast');
return false;
});
});
$(function () { $('div#tab').each(function () { var tabContainers = $('> div', this); var tabs = $('> ul.tabnav li a', this);
$('ul.tabnav a', this.siblings).click(function () {
tabContainers.hide().filter(this.hash).show();
tabs.removeClass('selected');
$(this).addClass('selected');
return false;
}).filter(':first').click();
});
});
$(function(){
$("ul.dropdown li").hover(function(){
$(this).addClass("hover");
$('ul:first',this).css('visibility', 'visible');
}, function(){
$(this).removeClass("hover");
$('ul:first',this).css('visibility', 'hidden');
});
});
$(function(){
$('#comments-open-data').hide();
$('#comments-open-captcha').hide();
});