/* (c) 2011 Vertex42 LLC. All rights reserved.*/
var headerscripts = true;
function v42_display_notice(theNotice,theClass){if(theClass!=''){jQuery("#user-notice").removeClass();jQuery("#user-notice").addClass(theClass);}jQuery("#user-notice").html(theNotice).animate({width:'toggle'},250).delay(3000).animate({width:'toggle'},250);}
function v42_xc_temp_unlock(){var thePath=$(location).attr('pathname');$.ajax({type:"POST",url:"/db/ajax.php",data:"action=unlock&thepath="+thePath,dataType:"json",});}
function v42_xc_lock(){$.ajax({type:"POST",url:"/db/ajax.php",data:"action=lock",dataType:"json",success:function(msg){if(msg.status==1){var thePath=$(location).attr('pathname');$.cookie('v42_xc_unlocked',null,{path:thePath});}}});}
function v42_start_countdown(divID,theFile){if(typeof xc_unlocked!='undefined')if(xc_unlocked==true)return true;var sec=$('#'+divID+' .countdown').text()||60;var timer=setInterval(function(){$('#'+divID+' .countdown').text(--sec);if(sec==-1){$('#'+divID+' .msg').html('<span class="msg">Temporarily Unlocked</span>').addClass('unlocked');$('#'+divID+' a').removeClass('locked');$('#'+divID+' a').attr('onClick','');clearInterval(timer);v42_xc_temp_unlock();}},1000);}

/* jquery_cookie.js Copyright (c) 2006 Klaus Hartl (stilbuero.de), Dual licensed under the MIT and GPL licenses */
jQuery.cookie=function(name,value,options){if(typeof value!='undefined'||(name&&typeof name!='string')){if(typeof name=='string'){options=options||{};if(value===null){value='';options.expires=-1;}
var expires='';if(options.expires&&(typeof options.expires=='number'||options.expires.toUTCString)){var date;if(typeof options.expires=='number'){date=new Date();date.setTime(date.getTime()+(options.expires*24*60*60*1000));}else{date=options.expires;}
expires='; expires='+date.toUTCString();}
var path=options.path?'; path='+(options.path):'';var domain=options.domain?'; domain='+(options.domain):'';var secure=options.secure?'; secure':'';document.cookie=name+'='+encodeURIComponent(value)+expires+path+domain+secure;}else{for(var n in name){jQuery.cookie(n,name[n],value||options);}}}else{var returnValue={};if(document.cookie){var cookies=document.cookie.split(';');for(var i=0;i<cookies.length;i++){var cookie=jQuery.trim(cookies[i]);if(!name){var nameLength=cookie.indexOf('=');returnValue[cookie.substr(0,nameLength)]=decodeURIComponent(cookie.substr(nameLength+1));}else if(cookie.substr(0,name.length+1)==(name+'=')){returnValue=decodeURIComponent(cookie.substr(name.length+1));break;}}}
return returnValue;}};

function v42_gplus_callback(theObj){if(theObj.state=='on'){v42_display_notice("Thank you :-)",'success');}}

