(function(){var
window=this,undefined,_jQuery=window.jQuery,_$=window.$,jQuery=window.jQuery=window.$=function(selector,context){return new jQuery.fn.init(selector,context);},quickExpr=/^[^<]*(<(.|\s)+>)[^>]*$|^#([\w-]+)$/,isSimple=/^.[^:#\[\.,]*$/;jQuery.fn=jQuery.prototype={init:function(selector,context){selector=selector||document;if(selector.nodeType){this[0]=selector;this.length=1;this.context=selector;return this;}if(typeof selector==="string"){var match=quickExpr.exec(selector);if(match&&(match[1]||!context)){if(match[1])selector=jQuery.clean([match[1]],context);else{var elem=document.getElementById(match[3]);if(elem&&elem.id!=match[3])return jQuery().find(selector);var ret=jQuery(elem||[]);ret.context=document;ret.selector=selector;return ret;}}else
return jQuery(context).find(selector);}else if(jQuery.isFunction(selector))return jQuery(document).ready(selector);if(selector.selector&&selector.context){this.selector=selector.selector;this.context=selector.context;}return this.setArray(jQuery.isArray(selector)?selector:jQuery.makeArray(selector));},selector:"",jquery:"1.3.2",size:function(){return this.length;},get:function(num){return num===undefined?Array.prototype.slice.call(this):this[num];},pushStack:function(elems,name,selector){var ret=jQuery(elems);ret.prevObject=this;ret.context=this.context;if(name==="find")ret.selector=this.selector+(this.selector?" ":"")+selector;else if(name)ret.selector=this.selector+"."+name+"("+selector+")";return ret;},setArray:function(elems){this.length=0;Array.prototype.push.apply(this,elems);return this;},each:function(callback,args){return jQuery.each(this,callback,args);},index:function(elem){return jQuery.inArray(elem&&elem.jquery?elem[0]:elem,this);},attr:function(name,value,type){var options=name;if(typeof name==="string")if(value===undefined)return this[0]&&jQuery[type||"attr"](this[0],name);else{options={};options[name]=value;}return this.each(function(i){for(name in options)jQuery.attr(type?this.style:this,name,jQuery.prop(this,options[name],type,i,name));});},css:function(key,value){if((key=='width'||key=='height')&&parseFloat(value)<0)value=undefined;return this.attr(key,value,"curCSS");},text:function(text){if(typeof text!=="object"&&text!=null)return this.empty().append((this[0]&&this[0].ownerDocument||document).createTextNode(text));var ret="";jQuery.each(text||this,function(){jQuery.each(this.childNodes,function(){if(this.nodeType!=8)ret+=this.nodeType!=1?this.nodeValue:jQuery.fn.text([this]);});});return ret;},wrapAll:function(html){if(this[0]){var wrap=jQuery(html,this[0].ownerDocument).clone();if(this[0].parentNode)wrap.insertBefore(this[0]);wrap.map(function(){var elem=this;while(elem.firstChild)elem=elem.firstChild;return elem;}).append(this);}return this;},wrapInner:function(html){return this.each(function(){jQuery(this).contents().wrapAll(html);});},wrap:function(html){return this.each(function(){jQuery(this).wrapAll(html);});},append:function(){return this.domManip(arguments,true,function(elem){if(this.nodeType==1)this.appendChild(elem);});},prepend:function(){return this.domManip(arguments,true,function(elem){if(this.nodeType==1)this.insertBefore(elem,this.firstChild);});},before:function(){return this.domManip(arguments,false,function(elem){this.parentNode.insertBefore(elem,this);});},after:function(){return this.domManip(arguments,false,function(elem){this.parentNode.insertBefore(elem,this.nextSibling);});},end:function(){return this.prevObject||jQuery([]);},push:[].push,sort:[].sort,splice:[].splice,find:function(selector){if(this.length===1){var ret=this.pushStack([],"find",selector);ret.length=0;jQuery.find(selector,this[0],ret);return ret;}else{return this.pushStack(jQuery.unique(jQuery.map(this,function(elem){return jQuery.find(selector,elem);})),"find",selector);}},clone:function(events){var ret=this.map(function(){if(!jQuery.support.noCloneEvent&&!jQuery.isXMLDoc(this)){var html=this.outerHTML;if(!html){var div=this.ownerDocument.createElement("div");div.appendChild(this.cloneNode(true));html=div.innerHTML;}return jQuery.clean([html.replace(/ jQuery\d+="(?:\d+|null)"/g,"").replace(/^\s*/,"")])[0];}else
return this.cloneNode(true);});if(events===true){var orig=this.find("*").andSelf(),i=0;ret.find("*").andSelf().each(function(){if(this.nodeName!==orig[i].nodeName)return;var events=jQuery.data(orig[i],"events");for(var type in events){for(var handler in events[type]){jQuery.event.add(this,type,events[type][handler],events[type][handler].data);}}i++;});}return ret;},filter:function(selector){return this.pushStack(jQuery.isFunction(selector)&&jQuery.grep(this,function(elem,i){return selector.call(elem,i);})||jQuery.multiFilter(selector,jQuery.grep(this,function(elem){return elem.nodeType===1;})),"filter",selector);},closest:function(selector){var pos=jQuery.expr.match.POS.test(selector)?jQuery(selector):null,closer=0;return this.map(function(){var cur=this;while(cur&&cur.ownerDocument){if(pos?pos.index(cur)>-1:jQuery(cur).is(selector)){jQuery.data(cur,"closest",closer);return cur;}cur=cur.parentNode;closer++;}});},not:function(selector){if(typeof selector==="string")if(isSimple.test(selector))return this.pushStack(jQuery.multiFilter(selector,this,true),"not",selector);else
selector=jQuery.multiFilter(selector,this);var isArrayLike=selector.length&&selector[selector.length-1]!==undefined&&!selector.nodeType;return this.filter(function(){return isArrayLike?jQuery.inArray(this,selector)<0:this!=selector;});},add:function(selector){return this.pushStack(jQuery.unique(jQuery.merge(this.get(),typeof selector==="string"?jQuery(selector):jQuery.makeArray(selector))));},is:function(selector){return!!selector&&jQuery.multiFilter(selector,this).length>0;},hasClass:function(selector){return!!selector&&this.is("."+selector);},val:function(value){if(value===undefined){var elem=this[0];if(elem){if(jQuery.nodeName(elem,'option'))return(elem.attributes.value||{}).specified?elem.value:elem.text;if(jQuery.nodeName(elem,"select")){var index=elem.selectedIndex,values=[],options=elem.options,one=elem.type=="select-one";if(index<0)return null;for(var i=one?index:0,max=one?index+1:options.length;i<max;i++){var option=options[i];if(option.selected){value=jQuery(option).val();if(one)return value;values.push(value);}}return values;}return(elem.value||"").replace(/\r/g,"");}return undefined;}if(typeof value==="number")value+='';return this.each(function(){if(this.nodeType!=1)return;if(jQuery.isArray(value)&&/radio|checkbox/.test(this.type))this.checked=(jQuery.inArray(this.value,value)>=0||jQuery.inArray(this.name,value)>=0);else if(jQuery.nodeName(this,"select")){var values=jQuery.makeArray(value);jQuery("option",this).each(function(){this.selected=(jQuery.inArray(this.value,values)>=0||jQuery.inArray(this.text,values)>=0);});if(!values.length)this.selectedIndex=-1;}else
this.value=value;});},html:function(value){return value===undefined?(this[0]?this[0].innerHTML.replace(/ jQuery\d+="(?:\d+|null)"/g,""):null):this.empty().append(value);},replaceWith:function(value){return this.after(value).remove();},eq:function(i){return this.slice(i,+i+1);},slice:function(){return this.pushStack(Array.prototype.slice.apply(this,arguments),"slice",Array.prototype.slice.call(arguments).join(","));},map:function(callback){return this.pushStack(jQuery.map(this,function(elem,i){return callback.call(elem,i,elem);}));},andSelf:function(){return this.add(this.prevObject);},domManip:function(args,table,callback){if(this[0]){var fragment=(this[0].ownerDocument||this[0]).createDocumentFragment(),scripts=jQuery.clean(args,(this[0].ownerDocument||this[0]),fragment),first=fragment.firstChild;if(first)for(var i=0,l=this.length;i<l;i++)callback.call(root(this[i],first),this.length>1||i>0?fragment.cloneNode(true):fragment);if(scripts)jQuery.each(scripts,evalScript);}return this;function root(elem,cur){return table&&jQuery.nodeName(elem,"table")&&jQuery.nodeName(cur,"tr")?(elem.getElementsByTagName("tbody")[0]||elem.appendChild(elem.ownerDocument.createElement("tbody"))):elem;}}};jQuery.fn.init.prototype=jQuery.fn;function evalScript(i,elem){if(elem.src)jQuery.ajax({url:elem.src,async:false,dataType:"script"});else
jQuery.globalEval(elem.text||elem.textContent||elem.innerHTML||"");if(elem.parentNode)elem.parentNode.removeChild(elem);}function now(){return+new Date;}jQuery.extend=jQuery.fn.extend=function(){var target=arguments[0]||{},i=1,length=arguments.length,deep=false,options;if(typeof target==="boolean"){deep=target;target=arguments[1]||{};i=2;}if(typeof target!=="object"&&!jQuery.isFunction(target))target={};if(length==i){target=this;--i;}for(;i<length;i++)if((options=arguments[i])!=null)for(var name in options){var src=target[name],copy=options[name];if(target===copy)continue;if(deep&&copy&&typeof copy==="object"&&!copy.nodeType)target[name]=jQuery.extend(deep,src||(copy.length!=null?[]:{}),copy);else if(copy!==undefined)target[name]=copy;}return target;};var exclude=/z-?index|font-?weight|opacity|zoom|line-?height/i,defaultView=document.defaultView||{},toString=Object.prototype.toString;jQuery.extend({noConflict:function(deep){window.$=_$;if(deep)window.jQuery=_jQuery;return jQuery;},isFunction:function(obj){return toString.call(obj)==="[object Function]";},isArray:function(obj){return toString.call(obj)==="[object Array]";},isXMLDoc:function(elem){return elem.nodeType===9&&elem.documentElement.nodeName!=="HTML"||!!elem.ownerDocument&&jQuery.isXMLDoc(elem.ownerDocument);},globalEval:function(data){if(data&&/\S/.test(data)){var head=document.getElementsByTagName("head")[0]||document.documentElement,script=document.createElement("script");script.type="text/javascript";if(jQuery.support.scriptEval)script.appendChild(document.createTextNode(data));else
script.text=data;head.insertBefore(script,head.firstChild);head.removeChild(script);}},nodeName:function(elem,name){return elem.nodeName&&elem.nodeName.toUpperCase()==name.toUpperCase();},each:function(object,callback,args){var name,i=0,length=object.length;if(args){if(length===undefined){for(name in object)if(callback.apply(object[name],args)===false)break;}else
for(;i<length;)if(callback.apply(object[i++],args)===false)break;}else{if(length===undefined){for(name in object)if(callback.call(object[name],name,object[name])===false)break;}else
for(var value=object[0];i<length&&callback.call(value,i,value)!==false;value=object[++i]){}}return object;},prop:function(elem,value,type,i,name){if(jQuery.isFunction(value))value=value.call(elem,i);return typeof value==="number"&&type=="curCSS"&&!exclude.test(name)?value+"px":value;},className:{add:function(elem,classNames){jQuery.each((classNames||"").split(/\s+/),function(i,className){if(elem.nodeType==1&&!jQuery.className.has(elem.className,className))elem.className+=(elem.className?" ":"")+className;});},remove:function(elem,classNames){if(elem.nodeType==1)elem.className=classNames!==undefined?jQuery.grep(elem.className.split(/\s+/),function(className){return!jQuery.className.has(classNames,className);}).join(" "):"";},has:function(elem,className){return elem&&jQuery.inArray(className,(elem.className||elem).toString().split(/\s+/))>-1;}},swap:function(elem,options,callback){var old={};for(var name in options){old[name]=elem.style[name];elem.style[name]=options[name];}callback.call(elem);for(var name in options)elem.style[name]=old[name];},css:function(elem,name,force,extra){if(name=="width"||name=="height"){var val,props={position:"absolute",visibility:"hidden",display:"block"},which=name=="width"?["Left","Right"]:["Top","Bottom"];function getWH(){val=name=="width"?elem.offsetWidth:elem.offsetHeight;if(extra==="border")return;jQuery.each(which,function(){if(!extra)val-=parseFloat(jQuery.curCSS(elem,"padding"+this,true))||0;if(extra==="margin")val+=parseFloat(jQuery.curCSS(elem,"margin"+this,true))||0;else
val-=parseFloat(jQuery.curCSS(elem,"border"+this+"Width",true))||0;});}if(elem.offsetWidth!==0)getWH();else
jQuery.swap(elem,props,getWH);return Math.max(0,Math.round(val));}return jQuery.curCSS(elem,name,force);},curCSS:function(elem,name,force){var ret,style=elem.style;if(name=="opacity"&&!jQuery.support.opacity){ret=jQuery.attr(style,"opacity");return ret==""?"1":ret;}if(name.match(/float/i))name=styleFloat;if(!force&&style&&style[name])ret=style[name];else if(defaultView.getComputedStyle){if(name.match(/float/i))name="float";name=name.replace(/([A-Z])/g,"-$1").toLowerCase();var computedStyle=defaultView.getComputedStyle(elem,null);if(computedStyle)ret=computedStyle.getPropertyValue(name);if(name=="opacity"&&ret=="")ret="1";}else if(elem.currentStyle){var camelCase=name.replace(/\-(\w)/g,function(all,letter){return letter.toUpperCase();});ret=elem.currentStyle[name]||elem.currentStyle[camelCase];if(!/^\d+(px)?$/i.test(ret)&&/^\d/.test(ret)){var left=style.left,rsLeft=elem.runtimeStyle.left;elem.runtimeStyle.left=elem.currentStyle.left;style.left=ret||0;ret=style.pixelLeft+"px";style.left=left;elem.runtimeStyle.left=rsLeft;}}return ret;},clean:function(elems,context,fragment){context=context||document;if(typeof context.createElement==="undefined")context=context.ownerDocument||context[0]&&context[0].ownerDocument||document;if(!fragment&&elems.length===1&&typeof elems[0]==="string"){var match=/^<(\w+)\s*\/?>$/.exec(elems[0]);if(match)return[context.createElement(match[1])];}var ret=[],scripts=[],div=context.createElement("div");jQuery.each(elems,function(i,elem){if(typeof elem==="number")elem+='';if(!elem)return;if(typeof elem==="string"){elem=elem.replace(/(<(\w+)[^>]*?)\/>/g,function(all,front,tag){return tag.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i)?all:front+"></"+tag+">";});var tags=elem.replace(/^\s+/,"").substring(0,10).toLowerCase();var wrap=!tags.indexOf("<opt")&&[1,"<select multiple='multiple'>","</select>"]||!tags.indexOf("<leg")&&[1,"<fieldset>","</fieldset>"]||tags.match(/^<(thead|tbody|tfoot|colg|cap)/)&&[1,"<table>","</table>"]||!tags.indexOf("<tr")&&[2,"<table><tbody>","</tbody></table>"]||(!tags.indexOf("<td")||!tags.indexOf("<th"))&&[3,"<table><tbody><tr>","</tr></tbody></table>"]||!tags.indexOf("<col")&&[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"]||!jQuery.support.htmlSerialize&&[1,"div<div>","</div>"]||[0,"",""];div.innerHTML=wrap[1]+elem+wrap[2];while(wrap[0]--)div=div.lastChild;if(!jQuery.support.tbody){var hasBody=/<tbody/i.test(elem),tbody=!tags.indexOf("<table")&&!hasBody?div.firstChild&&div.firstChild.childNodes:wrap[1]=="<table>"&&!hasBody?div.childNodes:[];for(var j=tbody.length-1;j>=0;--j)if(jQuery.nodeName(tbody[j],"tbody")&&!tbody[j].childNodes.length)tbody[j].parentNode.removeChild(tbody[j]);}if(!jQuery.support.leadingWhitespace&&/^\s/.test(elem))div.insertBefore(context.createTextNode(elem.match(/^\s*/)[0]),div.firstChild);elem=jQuery.makeArray(div.childNodes);}if(elem.nodeType)ret.push(elem);else
ret=jQuery.merge(ret,elem);});if(fragment){for(var i=0;ret[i];i++){if(jQuery.nodeName(ret[i],"script")&&(!ret[i].type||ret[i].type.toLowerCase()==="text/javascript")){scripts.push(ret[i].parentNode?ret[i].parentNode.removeChild(ret[i]):ret[i]);}else{if(ret[i].nodeType===1)ret.splice.apply(ret,[i+1,0].concat(jQuery.makeArray(ret[i].getElementsByTagName("script"))));fragment.appendChild(ret[i]);}}return scripts;}return ret;},attr:function(elem,name,value){if(!elem||elem.nodeType==3||elem.nodeType==8)return undefined;var notxml=!jQuery.isXMLDoc(elem),set=value!==undefined;name=notxml&&jQuery.props[name]||name;if(elem.tagName){var special=/href|src|style/.test(name);if(name=="selected"&&elem.parentNode)elem.parentNode.selectedIndex;if(name in elem&&notxml&&!special){if(set){if(name=="type"&&jQuery.nodeName(elem,"input")&&elem.parentNode)throw"type property can't be changed";elem[name]=value;}if(jQuery.nodeName(elem,"form")&&elem.getAttributeNode(name))return elem.getAttributeNode(name).nodeValue;if(name=="tabIndex"){var attributeNode=elem.getAttributeNode("tabIndex");return attributeNode&&attributeNode.specified?attributeNode.value:elem.nodeName.match(/(button|input|object|select|textarea)/i)?0:elem.nodeName.match(/^(a|area)$/i)&&elem.href?0:undefined;}return elem[name];}if(!jQuery.support.style&&notxml&&name=="style")return jQuery.attr(elem.style,"cssText",value);if(set)elem.setAttribute(name,""+value);var attr=!jQuery.support.hrefNormalized&&notxml&&special?elem.getAttribute(name,2):elem.getAttribute(name);return attr===null?undefined:attr;}if(!jQuery.support.opacity&&name=="opacity"){if(set){elem.zoom=1;elem.filter=(elem.filter||"").replace(/alpha\([^)]*\)/,"")+(parseInt(value)+''=="NaN"?"":"alpha(opacity="+value*100+")");}return elem.filter&&elem.filter.indexOf("opacity=")>=0?(parseFloat(elem.filter.match(/opacity=([^)]*)/)[1])/100)+'':"";}name=name.replace(/-([a-z])/ig,function(all,letter){return letter.toUpperCase();});if(set)elem[name]=value;return elem[name];},trim:function(text){return(text||"").replace(/^\s+|\s+$/g,"");},makeArray:function(array){var ret=[];if(array!=null){var i=array.length;if(i==null||typeof array==="string"||jQuery.isFunction(array)||array.setInterval)ret[0]=array;else
while(i)ret[--i]=array[i];}return ret;},inArray:function(elem,array){for(var i=0,length=array.length;i<length;i++)if(array[i]===elem)return i;return-1;},merge:function(first,second){var i=0,elem,pos=first.length;if(!jQuery.support.getAll){while((elem=second[i++])!=null)if(elem.nodeType!=8)first[pos++]=elem;}else
while((elem=second[i++])!=null)first[pos++]=elem;return first;},unique:function(array){var ret=[],done={};try{for(var i=0,length=array.length;i<length;i++){var id=jQuery.data(array[i]);if(!done[id]){done[id]=true;ret.push(array[i]);}}}catch(e){ret=array;}return ret;},grep:function(elems,callback,inv){var ret=[];for(var i=0,length=elems.length;i<length;i++)if(!inv!=!callback(elems[i],i))ret.push(elems[i]);return ret;},map:function(elems,callback){var ret=[];for(var i=0,length=elems.length;i<length;i++){var value=callback(elems[i],i);if(value!=null)ret[ret.length]=value;}return ret.concat.apply([],ret);}});var userAgent=navigator.userAgent.toLowerCase();jQuery.browser={version:(userAgent.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[0,'0'])[1],safari:/webkit/.test(userAgent),opera:/opera/.test(userAgent),msie:/msie/.test(userAgent)&&!/opera/.test(userAgent),mozilla:/mozilla/.test(userAgent)&&!/(compatible|webkit)/.test(userAgent)};jQuery.each({parent:function(elem){return elem.parentNode;},parents:function(elem){return jQuery.dir(elem,"parentNode");},next:function(elem){return jQuery.nth(elem,2,"nextSibling");},prev:function(elem){return jQuery.nth(elem,2,"previousSibling");},nextAll:function(elem){return jQuery.dir(elem,"nextSibling");},prevAll:function(elem){return jQuery.dir(elem,"previousSibling");},siblings:function(elem){return jQuery.sibling(elem.parentNode.firstChild,elem);},children:function(elem){return jQuery.sibling(elem.firstChild);},contents:function(elem){return jQuery.nodeName(elem,"iframe")?elem.contentDocument||elem.contentWindow.document:jQuery.makeArray(elem.childNodes);}},function(name,fn){jQuery.fn[name]=function(selector){var ret=jQuery.map(this,fn);if(selector&&typeof selector=="string")ret=jQuery.multiFilter(selector,ret);return this.pushStack(jQuery.unique(ret),name,selector);};});jQuery.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(name,original){jQuery.fn[name]=function(selector){var ret=[],insert=jQuery(selector);for(var i=0,l=insert.length;i<l;i++){var elems=(i>0?this.clone(true):this).get();jQuery.fn[original].apply(jQuery(insert[i]),elems);ret=ret.concat(elems);}return this.pushStack(ret,name,selector);};});jQuery.each({removeAttr:function(name){jQuery.attr(this,name,"");if(this.nodeType==1)this.removeAttribute(name);},addClass:function(classNames){jQuery.className.add(this,classNames);},removeClass:function(classNames){jQuery.className.remove(this,classNames);},toggleClass:function(classNames,state){if(typeof state!=="boolean")state=!jQuery.className.has(this,classNames);jQuery.className[state?"add":"remove"](this,classNames);},remove:function(selector){if(!selector||jQuery.filter(selector,[this]).length){jQuery("*",this).add([this]).each(function(){jQuery.event.remove(this);jQuery.removeData(this);});if(this.parentNode)this.parentNode.removeChild(this);}},empty:function(){jQuery(this).children().remove();while(this.firstChild)this.removeChild(this.firstChild);}},function(name,fn){jQuery.fn[name]=function(){return this.each(fn,arguments);};});function num(elem,prop){return elem[0]&&parseInt(jQuery.curCSS(elem[0],prop,true),10)||0;}var expando="jQuery"+now(),uuid=0,windowData={};jQuery.extend({cache:{},data:function(elem,name,data){elem=elem==window?windowData:elem;var id=elem[expando];if(!id)id=elem[expando]=++uuid;if(name&&!jQuery.cache[id])jQuery.cache[id]={};if(data!==undefined)jQuery.cache[id][name]=data;return name?jQuery.cache[id][name]:id;},removeData:function(elem,name){elem=elem==window?windowData:elem;var id=elem[expando];if(name){if(jQuery.cache[id]){delete jQuery.cache[id][name];name="";for(name in jQuery.cache[id])break;if(!name)jQuery.removeData(elem);}}else{try{delete elem[expando];}catch(e){if(elem.removeAttribute)elem.removeAttribute(expando);}delete jQuery.cache[id];}},queue:function(elem,type,data){if(elem){type=(type||"fx")+"queue";var q=jQuery.data(elem,type);if(!q||jQuery.isArray(data))q=jQuery.data(elem,type,jQuery.makeArray(data));else if(data)q.push(data);}return q;},dequeue:function(elem,type){var queue=jQuery.queue(elem,type),fn=queue.shift();if(!type||type==="fx")fn=queue[0];if(fn!==undefined)fn.call(elem);}});jQuery.fn.extend({data:function(key,value){var parts=key.split(".");parts[1]=parts[1]?"."+parts[1]:"";if(value===undefined){var data=this.triggerHandler("getData"+parts[1]+"!",[parts[0]]);if(data===undefined&&this.length)data=jQuery.data(this[0],key);return data===undefined&&parts[1]?this.data(parts[0]):data;}else
return this.trigger("setData"+parts[1]+"!",[parts[0],value]).each(function(){jQuery.data(this,key,value);});},removeData:function(key){return this.each(function(){jQuery.removeData(this,key);});},queue:function(type,data){if(typeof type!=="string"){data=type;type="fx";}if(data===undefined)return jQuery.queue(this[0],type);return this.each(function(){var queue=jQuery.queue(this,type,data);if(type=="fx"&&queue.length==1)queue[0].call(this);});},dequeue:function(type){return this.each(function(){jQuery.dequeue(this,type);});}});(function(){var chunker=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?/g,done=0,toString=Object.prototype.toString;var Sizzle=function(selector,context,results,seed){results=results||[];context=context||document;if(context.nodeType!==1&&context.nodeType!==9)return[];if(!selector||typeof selector!=="string"){return results;}var parts=[],m,set,checkSet,check,mode,extra,prune=true;chunker.lastIndex=0;while((m=chunker.exec(selector))!==null){parts.push(m[1]);if(m[2]){extra=RegExp.rightContext;break;}}if(parts.length>1&&origPOS.exec(selector)){if(parts.length===2&&Expr.relative[parts[0]]){set=posProcess(parts[0]+parts[1],context);}else{set=Expr.relative[parts[0]]?[context]:Sizzle(parts.shift(),context);while(parts.length){selector=parts.shift();if(Expr.relative[selector])selector+=parts.shift();set=posProcess(selector,set);}}}else{var ret=seed?{expr:parts.pop(),set:makeArray(seed)}:Sizzle.find(parts.pop(),parts.length===1&&context.parentNode?context.parentNode:context,isXML(context));set=Sizzle.filter(ret.expr,ret.set);if(parts.length>0){checkSet=makeArray(set);}else{prune=false;}while(parts.length){var cur=parts.pop(),pop=cur;if(!Expr.relative[cur]){cur="";}else{pop=parts.pop();}if(pop==null){pop=context;}Expr.relative[cur](checkSet,pop,isXML(context));}}if(!checkSet){checkSet=set;}if(!checkSet){throw"Syntax error, unrecognized expression: "+(cur||selector);}if(toString.call(checkSet)==="[object Array]"){if(!prune){results.push.apply(results,checkSet);}else if(context.nodeType===1){for(var i=0;checkSet[i]!=null;i++){if(checkSet[i]&&(checkSet[i]===true||checkSet[i].nodeType===1&&contains(context,checkSet[i]))){results.push(set[i]);}}}else{for(var i=0;checkSet[i]!=null;i++){if(checkSet[i]&&checkSet[i].nodeType===1){results.push(set[i]);}}}}else{makeArray(checkSet,results);}if(extra){Sizzle(extra,context,results,seed);if(sortOrder){hasDuplicate=false;results.sort(sortOrder);if(hasDuplicate){for(var i=1;i<results.length;i++){if(results[i]===results[i-1]){results.splice(i--,1);}}}}}return results;};Sizzle.matches=function(expr,set){return Sizzle(expr,null,null,set);};Sizzle.find=function(expr,context,isXML){var set,match;if(!expr){return[];}for(var i=0,l=Expr.order.length;i<l;i++){var type=Expr.order[i],match;if((match=Expr.match[type].exec(expr))){var left=RegExp.leftContext;if(left.substr(left.length-1)!=="\\"){match[1]=(match[1]||"").replace(/\\/g,"");set=Expr.find[type](match,context,isXML);if(set!=null){expr=expr.replace(Expr.match[type],"");break;}}}}if(!set){set=context.getElementsByTagName("*");}return{set:set,expr:expr};};Sizzle.filter=function(expr,set,inplace,not){var old=expr,result=[],curLoop=set,match,anyFound,isXMLFilter=set&&set[0]&&isXML(set[0]);while(expr&&set.length){for(var type in Expr.filter){if((match=Expr.match[type].exec(expr))!=null){var filter=Expr.filter[type],found,item;anyFound=false;if(curLoop==result){result=[];}if(Expr.preFilter[type]){match=Expr.preFilter[type](match,curLoop,inplace,result,not,isXMLFilter);if(!match){anyFound=found=true;}else if(match===true){continue;}}if(match){for(var i=0;(item=curLoop[i])!=null;i++){if(item){found=filter(item,match,i,curLoop);var pass=not^!!found;if(inplace&&found!=null){if(pass){anyFound=true;}else{curLoop[i]=false;}}else if(pass){result.push(item);anyFound=true;}}}}if(found!==undefined){if(!inplace){curLoop=result;}expr=expr.replace(Expr.match[type],"");if(!anyFound){return[];}break;}}}if(expr==old){if(anyFound==null){throw"Syntax error, unrecognized expression: "+expr;}else{break;}}old=expr;}return curLoop;};var Expr=Sizzle.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF_-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF_-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF_-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF_-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*_-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\((even|odd|[\dn+-]*)\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF_-]|\\.)+)(?:\((['"]*)((?:\([^\)]+\)|[^\2\(\)]*)+)\2\))?/},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(elem){return elem.getAttribute("href");}},relative:{"+":function(checkSet,part,isXML){var isPartStr=typeof part==="string",isTag=isPartStr&&!/\W/.test(part),isPartStrNotTag=isPartStr&&!isTag;if(isTag&&!isXML){part=part.toUpperCase();}for(var i=0,l=checkSet.length,elem;i<l;i++){if((elem=checkSet[i])){while((elem=elem.previousSibling)&&elem.nodeType!==1){}checkSet[i]=isPartStrNotTag||elem&&elem.nodeName===part?elem||false:elem===part;}}if(isPartStrNotTag){Sizzle.filter(part,checkSet,true);}},">":function(checkSet,part,isXML){var isPartStr=typeof part==="string";if(isPartStr&&!/\W/.test(part)){part=isXML?part:part.toUpperCase();for(var i=0,l=checkSet.length;i<l;i++){var elem=checkSet[i];if(elem){var parent=elem.parentNode;checkSet[i]=parent.nodeName===part?parent:false;}}}else{for(var i=0,l=checkSet.length;i<l;i++){var elem=checkSet[i];if(elem){checkSet[i]=isPartStr?elem.parentNode:elem.parentNode===part;}}if(isPartStr){Sizzle.filter(part,checkSet,true);}}},"":function(checkSet,part,isXML){var doneName=done++,checkFn=dirCheck;if(!part.match(/\W/)){var nodeCheck=part=isXML?part:part.toUpperCase();checkFn=dirNodeCheck;}checkFn("parentNode",part,doneName,checkSet,nodeCheck,isXML);},"~":function(checkSet,part,isXML){var doneName=done++,checkFn=dirCheck;if(typeof part==="string"&&!part.match(/\W/)){var nodeCheck=part=isXML?part:part.toUpperCase();checkFn=dirNodeCheck;}checkFn("previousSibling",part,doneName,checkSet,nodeCheck,isXML);}},find:{ID:function(match,context,isXML){if(typeof context.getElementById!=="undefined"&&!isXML){var m=context.getElementById(match[1]);return m?[m]:[];}},NAME:function(match,context,isXML){if(typeof context.getElementsByName!=="undefined"){var ret=[],results=context.getElementsByName(match[1]);for(var i=0,l=results.length;i<l;i++){if(results[i].getAttribute("name")===match[1]){ret.push(results[i]);}}return ret.length===0?null:ret;}},TAG:function(match,context){return context.getElementsByTagName(match[1]);}},preFilter:{CLASS:function(match,curLoop,inplace,result,not,isXML){match=" "+match[1].replace(/\\/g,"")+" ";if(isXML){return match;}for(var i=0,elem;(elem=curLoop[i])!=null;i++){if(elem){if(not^(elem.className&&(" "+elem.className+" ").indexOf(match)>=0)){if(!inplace)result.push(elem);}else if(inplace){curLoop[i]=false;}}}return false;},ID:function(match){return match[1].replace(/\\/g,"");},TAG:function(match,curLoop){for(var i=0;curLoop[i]===false;i++){}return curLoop[i]&&isXML(curLoop[i])?match[1]:match[1].toUpperCase();},CHILD:function(match){if(match[1]=="nth"){var test=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(match[2]=="even"&&"2n"||match[2]=="odd"&&"2n+1"||!/\D/.test(match[2])&&"0n+"+match[2]||match[2]);match[2]=(test[1]+(test[2]||1))-0;match[3]=test[3]-0;}match[0]=done++;return match;},ATTR:function(match,curLoop,inplace,result,not,isXML){var name=match[1].replace(/\\/g,"");if(!isXML&&Expr.attrMap[name]){match[1]=Expr.attrMap[name];}if(match[2]==="~="){match[4]=" "+match[4]+" ";}return match;},PSEUDO:function(match,curLoop,inplace,result,not){if(match[1]==="not"){if(match[3].match(chunker).length>1||/^\w/.test(match[3])){match[3]=Sizzle(match[3],null,null,curLoop);}else{var ret=Sizzle.filter(match[3],curLoop,inplace,true^not);if(!inplace){result.push.apply(result,ret);}return false;}}else if(Expr.match.POS.test(match[0])||Expr.match.CHILD.test(match[0])){return true;}return match;},POS:function(match){match.unshift(true);return match;}},filters:{enabled:function(elem){return elem.disabled===false&&elem.type!=="hidden";},disabled:function(elem){return elem.disabled===true;},checked:function(elem){return elem.checked===true;},selected:function(elem){elem.parentNode.selectedIndex;return elem.selected===true;},parent:function(elem){return!!elem.firstChild;},empty:function(elem){return!elem.firstChild;},has:function(elem,i,match){return!!Sizzle(match[3],elem).length;},header:function(elem){return/h\d/i.test(elem.nodeName);},text:function(elem){return"text"===elem.type;},radio:function(elem){return"radio"===elem.type;},checkbox:function(elem){return"checkbox"===elem.type;},file:function(elem){return"file"===elem.type;},password:function(elem){return"password"===elem.type;},submit:function(elem){return"submit"===elem.type;},image:function(elem){return"image"===elem.type;},reset:function(elem){return"reset"===elem.type;},button:function(elem){return"button"===elem.type||elem.nodeName.toUpperCase()==="BUTTON";},input:function(elem){return/input|select|textarea|button/i.test(elem.nodeName);}},setFilters:{first:function(elem,i){return i===0;},last:function(elem,i,match,array){return i===array.length-1;},even:function(elem,i){return i%2===0;},odd:function(elem,i){return i%2===1;},lt:function(elem,i,match){return i<match[3]-0;},gt:function(elem,i,match){return i>match[3]-0;},nth:function(elem,i,match){return match[3]-0==i;},eq:function(elem,i,match){return match[3]-0==i;}},filter:{PSEUDO:function(elem,match,i,array){var name=match[1],filter=Expr.filters[name];if(filter){return filter(elem,i,match,array);}else if(name==="contains"){return(elem.textContent||elem.innerText||"").indexOf(match[3])>=0;}else if(name==="not"){var not=match[3];for(var i=0,l=not.length;i<l;i++){if(not[i]===elem){return false;}}return true;}},CHILD:function(elem,match){var type=match[1],node=elem;switch(type){case'only':case'first':while(node=node.previousSibling){if(node.nodeType===1)return false;}if(type=='first')return true;node=elem;case'last':while(node=node.nextSibling){if(node.nodeType===1)return false;}return true;case'nth':var first=match[2],last=match[3];if(first==1&&last==0){return true;}var doneName=match[0],parent=elem.parentNode;if(parent&&(parent.sizcache!==doneName||!elem.nodeIndex)){var count=0;for(node=parent.firstChild;node;node=node.nextSibling){if(node.nodeType===1){node.nodeIndex=++count;}}parent.sizcache=doneName;}var diff=elem.nodeIndex-last;if(first==0){return diff==0;}else{return(diff%first==0&&diff/first>=0);}}},ID:function(elem,match){return elem.nodeType===1&&elem.getAttribute("id")===match;},TAG:function(elem,match){return(match==="*"&&elem.nodeType===1)||elem.nodeName===match;},CLASS:function(elem,match){return(" "+(elem.className||elem.getAttribute("class"))+" ").indexOf(match)>-1;},ATTR:function(elem,match){var name=match[1],result=Expr.attrHandle[name]?Expr.attrHandle[name](elem):elem[name]!=null?elem[name]:elem.getAttribute(name),value=result+"",type=match[2],check=match[4];return result==null?type==="!=":type==="="?value===check:type==="*="?value.indexOf(check)>=0:type==="~="?(" "+value+" ").indexOf(check)>=0:!check?value&&result!==false:type==="!="?value!=check:type==="^="?value.indexOf(check)===0:type==="$="?value.substr(value.length-check.length)===check:type==="|="?value===check||value.substr(0,check.length+1)===check+"-":false;},POS:function(elem,match,i,array){var name=match[2],filter=Expr.setFilters[name];if(filter){return filter(elem,i,match,array);}}}};var origPOS=Expr.match.POS;for(var type in Expr.match){Expr.match[type]=RegExp(Expr.match[type].source+/(?![^\[]*\])(?![^\(]*\))/.source);}var makeArray=function(array,results){array=Array.prototype.slice.call(array);if(results){results.push.apply(results,array);return results;}return array;};try{Array.prototype.slice.call(document.documentElement.childNodes);}catch(e){makeArray=function(array,results){var ret=results||[];if(toString.call(array)==="[object Array]"){Array.prototype.push.apply(ret,array);}else{if(typeof array.length==="number"){for(var i=0,l=array.length;i<l;i++){ret.push(array[i]);}}else{for(var i=0;array[i];i++){ret.push(array[i]);}}}return ret;};}var sortOrder;if(document.documentElement.compareDocumentPosition){sortOrder=function(a,b){var ret=a.compareDocumentPosition(b)&4?-1:a===b?0:1;if(ret===0){hasDuplicate=true;}return ret;};}else if("sourceIndex"in document.documentElement){sortOrder=function(a,b){var ret=a.sourceIndex-b.sourceIndex;if(ret===0){hasDuplicate=true;}return ret;};}else if(document.createRange){sortOrder=function(a,b){var aRange=a.ownerDocument.createRange(),bRange=b.ownerDocument.createRange();aRange.selectNode(a);aRange.collapse(true);bRange.selectNode(b);bRange.collapse(true);var ret=aRange.compareBoundaryPoints(Range.START_TO_END,bRange);if(ret===0){hasDuplicate=true;}return ret;};}(function(){var form=document.createElement("form"),id="script"+(new Date).getTime();form.innerHTML="<input name='"+id+"'/>";var root=document.documentElement;root.insertBefore(form,root.firstChild);if(!!document.getElementById(id)){Expr.find.ID=function(match,context,isXML){if(typeof context.getElementById!=="undefined"&&!isXML){var m=context.getElementById(match[1]);return m?m.id===match[1]||typeof m.getAttributeNode!=="undefined"&&m.getAttributeNode("id").nodeValue===match[1]?[m]:undefined:[];}};Expr.filter.ID=function(elem,match){var node=typeof elem.getAttributeNode!=="undefined"&&elem.getAttributeNode("id");return elem.nodeType===1&&node&&node.nodeValue===match;};}root.removeChild(form);})();(function(){var div=document.createElement("div");div.appendChild(document.createComment(""));if(div.getElementsByTagName("*").length>0){Expr.find.TAG=function(match,context){var results=context.getElementsByTagName(match[1]);if(match[1]==="*"){var tmp=[];for(var i=0;results[i];i++){if(results[i].nodeType===1){tmp.push(results[i]);}}results=tmp;}return results;};}div.innerHTML="<a href='#'></a>";if(div.firstChild&&typeof div.firstChild.getAttribute!=="undefined"&&div.firstChild.getAttribute("href")!=="#"){Expr.attrHandle.href=function(elem){return elem.getAttribute("href",2);};}})();if(document.querySelectorAll)(function(){var oldSizzle=Sizzle,div=document.createElement("div");div.innerHTML="<p class='TEST'></p>";if(div.querySelectorAll&&div.querySelectorAll(".TEST").length===0){return;}Sizzle=function(query,context,extra,seed){context=context||document;if(!seed&&context.nodeType===9&&!isXML(context)){try{return makeArray(context.querySelectorAll(query),extra);}catch(e){}}return oldSizzle(query,context,extra,seed);};Sizzle.find=oldSizzle.find;Sizzle.filter=oldSizzle.filter;Sizzle.selectors=oldSizzle.selectors;Sizzle.matches=oldSizzle.matches;})();if(document.getElementsByClassName&&document.documentElement.getElementsByClassName)(function(){var div=document.createElement("div");div.innerHTML="<div class='test e'></div><div class='test'></div>";if(div.getElementsByClassName("e").length===0)return;div.lastChild.className="e";if(div.getElementsByClassName("e").length===1)return;Expr.order.splice(1,0,"CLASS");Expr.find.CLASS=function(match,context,isXML){if(typeof context.getElementsByClassName!=="undefined"&&!isXML){return context.getElementsByClassName(match[1]);}};})();function dirNodeCheck(dir,cur,doneName,checkSet,nodeCheck,isXML){var sibDir=dir=="previousSibling"&&!isXML;for(var i=0,l=checkSet.length;i<l;i++){var elem=checkSet[i];if(elem){if(sibDir&&elem.nodeType===1){elem.sizcache=doneName;elem.sizset=i;}elem=elem[dir];var match=false;while(elem){if(elem.sizcache===doneName){match=checkSet[elem.sizset];break;}if(elem.nodeType===1&&!isXML){elem.sizcache=doneName;elem.sizset=i;}if(elem.nodeName===cur){match=elem;break;}elem=elem[dir];}checkSet[i]=match;}}}function dirCheck(dir,cur,doneName,checkSet,nodeCheck,isXML){var sibDir=dir=="previousSibling"&&!isXML;for(var i=0,l=checkSet.length;i<l;i++){var elem=checkSet[i];if(elem){if(sibDir&&elem.nodeType===1){elem.sizcache=doneName;elem.sizset=i;}elem=elem[dir];var match=false;while(elem){if(elem.sizcache===doneName){match=checkSet[elem.sizset];break;}if(elem.nodeType===1){if(!isXML){elem.sizcache=doneName;elem.sizset=i;}if(typeof cur!=="string"){if(elem===cur){match=true;break;}}else if(Sizzle.filter(cur,[elem]).length>0){match=elem;break;}}elem=elem[dir];}checkSet[i]=match;}}}var contains=document.compareDocumentPosition?function(a,b){return a.compareDocumentPosition(b)&16;}:function(a,b){return a!==b&&(a.contains?a.contains(b):true);};var isXML=function(elem){return elem.nodeType===9&&elem.documentElement.nodeName!=="HTML"||!!elem.ownerDocument&&isXML(elem.ownerDocument);};var posProcess=function(selector,context){var tmpSet=[],later="",match,root=context.nodeType?[context]:context;while((match=Expr.match.PSEUDO.exec(selector))){later+=match[0];selector=selector.replace(Expr.match.PSEUDO,"");}selector=Expr.relative[selector]?selector+"*":selector;for(var i=0,l=root.length;i<l;i++){Sizzle(selector,root[i],tmpSet);}return Sizzle.filter(later,tmpSet);};jQuery.find=Sizzle;jQuery.filter=Sizzle.filter;jQuery.expr=Sizzle.selectors;jQuery.expr[":"]=jQuery.expr.filters;Sizzle.selectors.filters.hidden=function(elem){return elem.offsetWidth===0||elem.offsetHeight===0;};Sizzle.selectors.filters.visible=function(elem){return elem.offsetWidth>0||elem.offsetHeight>0;};Sizzle.selectors.filters.animated=function(elem){return jQuery.grep(jQuery.timers,function(fn){return elem===fn.elem;}).length;};jQuery.multiFilter=function(expr,elems,not){if(not){expr=":not("+expr+")";}return Sizzle.matches(expr,elems);};jQuery.dir=function(elem,dir){var matched=[],cur=elem[dir];while(cur&&cur!=document){if(cur.nodeType==1)matched.push(cur);cur=cur[dir];}return matched;};jQuery.nth=function(cur,result,dir,elem){result=result||1;var num=0;for(;cur;cur=cur[dir])if(cur.nodeType==1&&++num==result)break;return cur;};jQuery.sibling=function(n,elem){var r=[];for(;n;n=n.nextSibling){if(n.nodeType==1&&n!=elem)r.push(n);}return r;};return;window.Sizzle=Sizzle;})();jQuery.event={add:function(elem,types,handler,data){if(elem.nodeType==3||elem.nodeType==8)return;if(elem.setInterval&&elem!=window)elem=window;if(!handler.guid)handler.guid=this.guid++;if(data!==undefined){var fn=handler;handler=this.proxy(fn);handler.data=data;}var events=jQuery.data(elem,"events")||jQuery.data(elem,"events",{}),handle=jQuery.data(elem,"handle")||jQuery.data(elem,"handle",function(){return typeof jQuery!=="undefined"&&!jQuery.event.triggered?jQuery.event.handle.apply(arguments.callee.elem,arguments):undefined;});handle.elem=elem;jQuery.each(types.split(/\s+/),function(index,type){var namespaces=type.split(".");type=namespaces.shift();handler.type=namespaces.slice().sort().join(".");var handlers=events[type];if(jQuery.event.specialAll[type])jQuery.event.specialAll[type].setup.call(elem,data,namespaces);if(!handlers){handlers=events[type]={};if(!jQuery.event.special[type]||jQuery.event.special[type].setup.call(elem,data,namespaces)===false){if(elem.addEventListener)elem.addEventListener(type,handle,false);else if(elem.attachEvent)elem.attachEvent("on"+type,handle);}}handlers[handler.guid]=handler;jQuery.event.global[type]=true;});elem=null;},guid:1,global:{},remove:function(elem,types,handler){if(elem.nodeType==3||elem.nodeType==8)return;var events=jQuery.data(elem,"events"),ret,index;if(events){if(types===undefined||(typeof types==="string"&&types.charAt(0)=="."))for(var type in events)this.remove(elem,type+(types||""));else{if(types.type){handler=types.handler;types=types.type;}jQuery.each(types.split(/\s+/),function(index,type){var namespaces=type.split(".");type=namespaces.shift();var namespace=RegExp("(^|\\.)"+namespaces.slice().sort().join(".*\\.")+"(\\.|$)");if(events[type]){if(handler)delete events[type][handler.guid];else
for(var handle in events[type])if(namespace.test(events[type][handle].type))delete events[type][handle];if(jQuery.event.specialAll[type])jQuery.event.specialAll[type].teardown.call(elem,namespaces);for(ret in events[type])break;if(!ret){if(!jQuery.event.special[type]||jQuery.event.special[type].teardown.call(elem,namespaces)===false){if(elem.removeEventListener)elem.removeEventListener(type,jQuery.data(elem,"handle"),false);else if(elem.detachEvent)elem.detachEvent("on"+type,jQuery.data(elem,"handle"));}ret=null;delete events[type];}}});}for(ret in events)break;if(!ret){var handle=jQuery.data(elem,"handle");if(handle)handle.elem=null;jQuery.removeData(elem,"events");jQuery.removeData(elem,"handle");}}},trigger:function(event,data,elem,bubbling){var type=event.type||event;if(!bubbling){event=typeof event==="object"?event[expando]?event:jQuery.extend(jQuery.Event(type),event):jQuery.Event(type);if(type.indexOf("!")>=0){event.type=type=type.slice(0,-1);event.exclusive=true;}if(!elem){event.stopPropagation();if(this.global[type])jQuery.each(jQuery.cache,function(){if(this.events&&this.events[type])jQuery.event.trigger(event,data,this.handle.elem);});}if(!elem||elem.nodeType==3||elem.nodeType==8)return undefined;event.result=undefined;event.target=elem;data=jQuery.makeArray(data);data.unshift(event);}event.currentTarget=elem;var handle=jQuery.data(elem,"handle");if(handle)handle.apply(elem,data);if((!elem[type]||(jQuery.nodeName(elem,'a')&&type=="click"))&&elem["on"+type]&&elem["on"+type].apply(elem,data)===false)event.result=false;if(!bubbling&&elem[type]&&!event.isDefaultPrevented()&&!(jQuery.nodeName(elem,'a')&&type=="click")){this.triggered=true;try{elem[type]();}catch(e){}}this.triggered=false;if(!event.isPropagationStopped()){var parent=elem.parentNode||elem.ownerDocument;if(parent)jQuery.event.trigger(event,data,parent,true);}},handle:function(event){var all,handlers;event=arguments[0]=jQuery.event.fix(event||window.event);event.currentTarget=this;var namespaces=event.type.split(".");event.type=namespaces.shift();all=!namespaces.length&&!event.exclusive;var namespace=RegExp("(^|\\.)"+namespaces.slice().sort().join(".*\\.")+"(\\.|$)");handlers=(jQuery.data(this,"events")||{})[event.type];for(var j in handlers){var handler=handlers[j];if(all||namespace.test(handler.type)){event.handler=handler;event.data=handler.data;var ret=handler.apply(this,arguments);if(ret!==undefined){event.result=ret;if(ret===false){event.preventDefault();event.stopPropagation();}}if(event.isImmediatePropagationStopped())break;}}},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode metaKey newValue originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),fix:function(event){if(event[expando])return event;var originalEvent=event;event=jQuery.Event(originalEvent);for(var i=this.props.length,prop;i;){prop=this.props[--i];event[prop]=originalEvent[prop];}if(!event.target)event.target=event.srcElement||document;if(event.target.nodeType==3)event.target=event.target.parentNode;if(!event.relatedTarget&&event.fromElement)event.relatedTarget=event.fromElement==event.target?event.toElement:event.fromElement;if(event.pageX==null&&event.clientX!=null){var doc=document.documentElement,body=document.body;event.pageX=event.clientX+(doc&&doc.scrollLeft||body&&body.scrollLeft||0)-(doc.clientLeft||0);event.pageY=event.clientY+(doc&&doc.scrollTop||body&&body.scrollTop||0)-(doc.clientTop||0);}if(!event.which&&((event.charCode||event.charCode===0)?event.charCode:event.keyCode))event.which=event.charCode||event.keyCode;if(!event.metaKey&&event.ctrlKey)event.metaKey=event.ctrlKey;if(!event.which&&event.button)event.which=(event.button&1?1:(event.button&2?3:(event.button&4?2:0)));return event;},proxy:function(fn,proxy){proxy=proxy||function(){return fn.apply(this,arguments);};proxy.guid=fn.guid=fn.guid||proxy.guid||this.guid++;return proxy;},special:{ready:{setup:bindReady,teardown:function(){}}},specialAll:{live:{setup:function(selector,namespaces){jQuery.event.add(this,namespaces[0],liveHandler);},teardown:function(namespaces){if(namespaces.length){var remove=0,name=RegExp("(^|\\.)"+namespaces[0]+"(\\.|$)");jQuery.each((jQuery.data(this,"events").live||{}),function(){if(name.test(this.type))remove++;});if(remove<1)jQuery.event.remove(this,namespaces[0],liveHandler);}}}}};jQuery.Event=function(src){if(!this.preventDefault)return new jQuery.Event(src);if(src&&src.type){this.originalEvent=src;this.type=src.type;}else
this.type=src;this.timeStamp=now();this[expando]=true;};function returnFalse(){return false;}function returnTrue(){return true;}jQuery.Event.prototype={preventDefault:function(){this.isDefaultPrevented=returnTrue;var e=this.originalEvent;if(!e)return;if(e.preventDefault)e.preventDefault();e.returnValue=false;},stopPropagation:function(){this.isPropagationStopped=returnTrue;var e=this.originalEvent;if(!e)return;if(e.stopPropagation)e.stopPropagation();e.cancelBubble=true;},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=returnTrue;this.stopPropagation();},isDefaultPrevented:returnFalse,isPropagationStopped:returnFalse,isImmediatePropagationStopped:returnFalse};var withinElement=function(event){var parent=event.relatedTarget;while(parent&&parent!=this)try{parent=parent.parentNode;}catch(e){parent=this;}if(parent!=this){event.type=event.data;jQuery.event.handle.apply(this,arguments);}};jQuery.each({mouseover:'mouseenter',mouseout:'mouseleave'},function(orig,fix){jQuery.event.special[fix]={setup:function(){jQuery.event.add(this,orig,withinElement,fix);},teardown:function(){jQuery.event.remove(this,orig,withinElement);}};});jQuery.fn.extend({bind:function(type,data,fn){return type=="unload"?this.one(type,data,fn):this.each(function(){jQuery.event.add(this,type,fn||data,fn&&data);});},one:function(type,data,fn){var one=jQuery.event.proxy(fn||data,function(event){jQuery(this).unbind(event,one);return(fn||data).apply(this,arguments);});return this.each(function(){jQuery.event.add(this,type,one,fn&&data);});},unbind:function(type,fn){return this.each(function(){jQuery.event.remove(this,type,fn);});},trigger:function(type,data){return this.each(function(){jQuery.event.trigger(type,data,this);});},triggerHandler:function(type,data){if(this[0]){var event=jQuery.Event(type);event.preventDefault();event.stopPropagation();jQuery.event.trigger(event,data,this[0]);return event.result;}},toggle:function(fn){var args=arguments,i=1;while(i<args.length)jQuery.event.proxy(fn,args[i++]);return this.click(jQuery.event.proxy(fn,function(event){this.lastToggle=(this.lastToggle||0)%i;event.preventDefault();return args[this.lastToggle++].apply(this,arguments)||false;}));},hover:function(fnOver,fnOut){return this.mouseenter(fnOver).mouseleave(fnOut);},ready:function(fn){bindReady();if(jQuery.isReady)fn.call(document,jQuery);else
jQuery.readyList.push(fn);return this;},live:function(type,fn){var proxy=jQuery.event.proxy(fn);proxy.guid+=this.selector+type;jQuery(document).bind(liveConvert(type,this.selector),this.selector,proxy);return this;},die:function(type,fn){jQuery(document).unbind(liveConvert(type,this.selector),fn?{guid:fn.guid+this.selector+type}:null);return this;}});function liveHandler(event){var check=RegExp("(^|\\.)"+event.type+"(\\.|$)"),stop=true,elems=[];jQuery.each(jQuery.data(this,"events").live||[],function(i,fn){if(check.test(fn.type)){var elem=jQuery(event.target).closest(fn.data)[0];if(elem)elems.push({elem:elem,fn:fn});}});elems.sort(function(a,b){return jQuery.data(a.elem,"closest")-jQuery.data(b.elem,"closest");});jQuery.each(elems,function(){if(this.fn.call(this.elem,event,this.fn.data)===false)return(stop=false);});return stop;}function liveConvert(type,selector){return["live",type,selector.replace(/\./g,"`").replace(/ /g,"|")].join(".");}jQuery.extend({isReady:false,readyList:[],ready:function(){if(!jQuery.isReady){jQuery.isReady=true;if(jQuery.readyList){jQuery.each(jQuery.readyList,function(){this.call(document,jQuery);});jQuery.readyList=null;}jQuery(document).triggerHandler("ready");}}});var readyBound=false;function bindReady(){if(readyBound)return;readyBound=true;if(document.addEventListener){document.addEventListener("DOMContentLoaded",function(){document.removeEventListener("DOMContentLoaded",arguments.callee,false);jQuery.ready();},false);}else if(document.attachEvent){document.attachEvent("onreadystatechange",function(){if(document.readyState==="complete"){document.detachEvent("onreadystatechange",arguments.callee);jQuery.ready();}});if(document.documentElement.doScroll&&window==window.top)(function(){if(jQuery.isReady)return;try{document.documentElement.doScroll("left");}catch(error){setTimeout(arguments.callee,0);return;}jQuery.ready();})();}jQuery.event.add(window,"load",jQuery.ready);}jQuery.each(("blur,focus,load,resize,scroll,unload,click,dblclick,"+"mousedown,mouseup,mousemove,mouseover,mouseout,mouseenter,mouseleave,"+"change,select,submit,keydown,keypress,keyup,error").split(","),function(i,name){jQuery.fn[name]=function(fn){return fn?this.bind(name,fn):this.trigger(name);};});jQuery(window).bind('unload',function(){for(var id in jQuery.cache)if(id!=1&&jQuery.cache[id].handle)jQuery.event.remove(jQuery.cache[id].handle.elem);});(function(){jQuery.support={};var root=document.documentElement,script=document.createElement("script"),div=document.createElement("div"),id="script"+(new Date).getTime();div.style.display="none";div.innerHTML='   <link/><table></table><a href="/a" style="color:red;float:left;opacity:.5;">a</a><select><option>text</option></select><object><param/></object>';var all=div.getElementsByTagName("*"),a=div.getElementsByTagName("a")[0];if(!all||!all.length||!a){return;}jQuery.support={leadingWhitespace:div.firstChild.nodeType==3,tbody:!div.getElementsByTagName("tbody").length,objectAll:!!div.getElementsByTagName("object")[0].getElementsByTagName("*").length,htmlSerialize:!!div.getElementsByTagName("link").length,style:/red/.test(a.getAttribute("style")),hrefNormalized:a.getAttribute("href")==="/a",opacity:a.style.opacity==="0.5",cssFloat:!!a.style.cssFloat,scriptEval:false,noCloneEvent:true,boxModel:null};script.type="text/javascript";try{script.appendChild(document.createTextNode("window."+id+"=1;"));}catch(e){}root.insertBefore(script,root.firstChild);if(window[id]){jQuery.support.scriptEval=true;delete window[id];}root.removeChild(script);if(div.attachEvent&&div.fireEvent){div.attachEvent("onclick",function(){jQuery.support.noCloneEvent=false;div.detachEvent("onclick",arguments.callee);});div.cloneNode(true).fireEvent("onclick");}jQuery(function(){var div=document.createElement("div");div.style.width=div.style.paddingLeft="1px";document.body.appendChild(div);jQuery.boxModel=jQuery.support.boxModel=div.offsetWidth===2;document.body.removeChild(div).style.display='none';});})();var styleFloat=jQuery.support.cssFloat?"cssFloat":"styleFloat";jQuery.props={"for":"htmlFor","class":"className","float":styleFloat,cssFloat:styleFloat,styleFloat:styleFloat,readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",tabindex:"tabIndex"};jQuery.fn.extend({_load:jQuery.fn.load,load:function(url,params,callback){if(typeof url!=="string")return this._load(url);var off=url.indexOf(" ");if(off>=0){var selector=url.slice(off,url.length);url=url.slice(0,off);}var type="GET";if(params)if(jQuery.isFunction(params)){callback=params;params=null;}else if(typeof params==="object"){params=jQuery.param(params);type="POST";}var self=this;jQuery.ajax({url:url,type:type,dataType:"html",data:params,complete:function(res,status){if(status=="success"||status=="notmodified")self.html(selector?jQuery("<div/>").append(res.responseText.replace(/<script(.|\s)*?\/script>/g,"")).find(selector):res.responseText);if(callback)self.each(callback,[res.responseText,status,res]);}});return this;},serialize:function(){return jQuery.param(this.serializeArray());},serializeArray:function(){return this.map(function(){return this.elements?jQuery.makeArray(this.elements):this;}).filter(function(){return this.name&&!this.disabled&&(this.checked||/select|textarea/i.test(this.nodeName)||/text|hidden|password|search/i.test(this.type));}).map(function(i,elem){var val=jQuery(this).val();return val==null?null:jQuery.isArray(val)?jQuery.map(val,function(val,i){return{name:elem.name,value:val};}):{name:elem.name,value:val};}).get();}});jQuery.each("ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","),function(i,o){jQuery.fn[o]=function(f){return this.bind(o,f);};});var jsc=now();jQuery.extend({get:function(url,data,callback,type){if(jQuery.isFunction(data)){callback=data;data=null;}return jQuery.ajax({type:"GET",url:url,data:data,success:callback,dataType:type});},getScript:function(url,callback){return jQuery.get(url,null,callback,"script");},getJSON:function(url,data,callback){return jQuery.get(url,data,callback,"json");},post:function(url,data,callback,type){if(jQuery.isFunction(data)){callback=data;data={};}return jQuery.ajax({type:"POST",url:url,data:data,success:callback,dataType:type});},ajaxSetup:function(settings){jQuery.extend(jQuery.ajaxSettings,settings);},ajaxSettings:{url:location.href,global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:function(){return window.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest();},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},ajax:function(s){s=jQuery.extend(true,s,jQuery.extend(true,{},jQuery.ajaxSettings,s));var jsonp,jsre=/=\?(&|$)/g,status,data,type=s.type.toUpperCase();if(s.data&&s.processData&&typeof s.data!=="string")s.data=jQuery.param(s.data);if(s.dataType=="jsonp"){if(type=="GET"){if(!s.url.match(jsre))s.url+=(s.url.match(/\?/)?"&":"?")+(s.jsonp||"callback")+"=?";}else if(!s.data||!s.data.match(jsre))s.data=(s.data?s.data+"&":"")+(s.jsonp||"callback")+"=?";s.dataType="json";}if(s.dataType=="json"&&(s.data&&s.data.match(jsre)||s.url.match(jsre))){jsonp="jsonp"+jsc++;if(s.data)s.data=(s.data+"").replace(jsre,"="+jsonp+"$1");s.url=s.url.replace(jsre,"="+jsonp+"$1");s.dataType="script";window[jsonp]=function(tmp){data=tmp;success();complete();window[jsonp]=undefined;try{delete window[jsonp];}catch(e){}if(head)head.removeChild(script);};}if(s.dataType=="script"&&s.cache==null)s.cache=false;if(s.cache===false&&type=="GET"){var ts=now();var ret=s.url.replace(/(\?|&)_=.*?(&|$)/,"$1_="+ts+"$2");s.url=ret+((ret==s.url)?(s.url.match(/\?/)?"&":"?")+"_="+ts:"");}if(s.data&&type=="GET"){s.url+=(s.url.match(/\?/)?"&":"?")+s.data;s.data=null;}if(s.global&&!jQuery.active++)jQuery.event.trigger("ajaxStart");var parts=/^(\w+:)?\/\/([^\/?#]+)/.exec(s.url);if(s.dataType=="script"&&type=="GET"&&parts&&(parts[1]&&parts[1]!=location.protocol||parts[2]!=location.host)){var head=document.getElementsByTagName("head")[0];var script=document.createElement("script");script.src=s.url;if(s.scriptCharset)script.charset=s.scriptCharset;if(!jsonp){var done=false;script.onload=script.onreadystatechange=function(){if(!done&&(!this.readyState||this.readyState=="loaded"||this.readyState=="complete")){done=true;success();complete();script.onload=script.onreadystatechange=null;head.removeChild(script);}};}head.appendChild(script);return undefined;}var requestDone=false;var xhr=s.xhr();if(s.username)xhr.open(type,s.url,s.async,s.username,s.password);else
xhr.open(type,s.url,s.async);try{if(s.data)xhr.setRequestHeader("Content-Type",s.contentType);if(s.ifModified)xhr.setRequestHeader("If-Modified-Since",jQuery.lastModified[s.url]||"Thu, 01 Jan 1970 00:00:00 GMT");xhr.setRequestHeader("X-Requested-With","XMLHttpRequest");xhr.setRequestHeader("Accept",s.dataType&&s.accepts[s.dataType]?s.accepts[s.dataType]+", */*":s.accepts._default);}catch(e){}if(s.beforeSend&&s.beforeSend(xhr,s)===false){if(s.global&&! --jQuery.active)jQuery.event.trigger("ajaxStop");xhr.abort();return false;}if(s.global)jQuery.event.trigger("ajaxSend",[xhr,s]);var onreadystatechange=function(isTimeout){if(xhr.readyState==0){if(ival){clearInterval(ival);ival=null;if(s.global&&! --jQuery.active)jQuery.event.trigger("ajaxStop");}}else if(!requestDone&&xhr&&(xhr.readyState==4||isTimeout=="timeout")){requestDone=true;if(ival){clearInterval(ival);ival=null;}status=isTimeout=="timeout"?"timeout":!jQuery.httpSuccess(xhr)?"error":s.ifModified&&jQuery.httpNotModified(xhr,s.url)?"notmodified":"success";if(status=="success"){try{data=jQuery.httpData(xhr,s.dataType,s);}catch(e){status="parsererror";}}if(status=="success"){var modRes;try{modRes=xhr.getResponseHeader("Last-Modified");}catch(e){}if(s.ifModified&&modRes)jQuery.lastModified[s.url]=modRes;if(!jsonp)success();}else
jQuery.handleError(s,xhr,status);complete();if(isTimeout)xhr.abort();if(s.async)xhr=null;}};if(s.async){var ival=setInterval(onreadystatechange,13);if(s.timeout>0)setTimeout(function(){if(xhr&&!requestDone)onreadystatechange("timeout");},s.timeout);}try{xhr.send(s.data);}catch(e){jQuery.handleError(s,xhr,null,e);}if(!s.async)onreadystatechange();function success(){if(s.success)s.success(data,status);if(s.global)jQuery.event.trigger("ajaxSuccess",[xhr,s]);}function complete(){if(s.complete)s.complete(xhr,status);if(s.global)jQuery.event.trigger("ajaxComplete",[xhr,s]);if(s.global&&! --jQuery.active)jQuery.event.trigger("ajaxStop");}return xhr;},handleError:function(s,xhr,status,e){if(s.error)s.error(xhr,status,e);if(s.global)jQuery.event.trigger("ajaxError",[xhr,s,e]);},active:0,httpSuccess:function(xhr){try{return!xhr.status&&location.protocol=="file:"||(xhr.status>=200&&xhr.status<300)||xhr.status==304||xhr.status==1223;}catch(e){}return false;},httpNotModified:function(xhr,url){try{var xhrRes=xhr.getResponseHeader("Last-Modified");return xhr.status==304||xhrRes==jQuery.lastModified[url];}catch(e){}return false;},httpData:function(xhr,type,s){var ct=xhr.getResponseHeader("content-type"),xml=type=="xml"||!type&&ct&&ct.indexOf("xml")>=0,data=xml?xhr.responseXML:xhr.responseText;if(xml&&data.documentElement.tagName=="parsererror")throw"parsererror";if(s&&s.dataFilter)data=s.dataFilter(data,type);if(typeof data==="string"){if(type=="script")jQuery.globalEval(data);if(type=="json")data=window["eval"]("("+data+")");}return data;},param:function(a){var s=[];function add(key,value){s[s.length]=encodeURIComponent(key)+'='+encodeURIComponent(value);};if(jQuery.isArray(a)||a.jquery)jQuery.each(a,function(){add(this.name,this.value);});else
for(var j in a)if(jQuery.isArray(a[j]))jQuery.each(a[j],function(){add(j,this);});else
add(j,jQuery.isFunction(a[j])?a[j]():a[j]);return s.join("&").replace(/%20/g,"+");}});var elemdisplay={},timerId,fxAttrs=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];function genFx(type,num){var obj={};jQuery.each(fxAttrs.concat.apply([],fxAttrs.slice(0,num)),function(){obj[this]=type;});return obj;}jQuery.fn.extend({show:function(speed,callback){if(speed){return this.animate(genFx("show",3),speed,callback);}else{for(var i=0,l=this.length;i<l;i++){var old=jQuery.data(this[i],"olddisplay");this[i].style.display=old||"";if(jQuery.css(this[i],"display")==="none"){var tagName=this[i].tagName,display;if(elemdisplay[tagName]){display=elemdisplay[tagName];}else{var elem=jQuery("<"+tagName+" />").appendTo("body");display=elem.css("display");if(display==="none")display="block";elem.remove();elemdisplay[tagName]=display;}jQuery.data(this[i],"olddisplay",display);}}for(var i=0,l=this.length;i<l;i++){this[i].style.display=jQuery.data(this[i],"olddisplay")||"";}return this;}},hide:function(speed,callback){if(speed){return this.animate(genFx("hide",3),speed,callback);}else{for(var i=0,l=this.length;i<l;i++){var old=jQuery.data(this[i],"olddisplay");if(!old&&old!=="none")jQuery.data(this[i],"olddisplay",jQuery.css(this[i],"display"));}for(var i=0,l=this.length;i<l;i++){this[i].style.display="none";}return this;}},_toggle:jQuery.fn.toggle,toggle:function(fn,fn2){var bool=typeof fn==="boolean";return jQuery.isFunction(fn)&&jQuery.isFunction(fn2)?this._toggle.apply(this,arguments):fn==null||bool?this.each(function(){var state=bool?fn:jQuery(this).is(":hidden");jQuery(this)[state?"show":"hide"]();}):this.animate(genFx("toggle",3),fn,fn2);},fadeTo:function(speed,to,callback){return this.animate({opacity:to},speed,callback);},animate:function(prop,speed,easing,callback){var optall=jQuery.speed(speed,easing,callback);return this[optall.queue===false?"each":"queue"](function(){var opt=jQuery.extend({},optall),p,hidden=this.nodeType==1&&jQuery(this).is(":hidden"),self=this;for(p in prop){if(prop[p]=="hide"&&hidden||prop[p]=="show"&&!hidden)return opt.complete.call(this);if((p=="height"||p=="width")&&this.style){opt.display=jQuery.css(this,"display");opt.overflow=this.style.overflow;}}if(opt.overflow!=null)this.style.overflow="hidden";opt.curAnim=jQuery.extend({},prop);jQuery.each(prop,function(name,val){var e=new jQuery.fx(self,opt,name);if(/toggle|show|hide/.test(val))e[val=="toggle"?hidden?"show":"hide":val](prop);else{var parts=val.toString().match(/^([+-]=)?([\d+-.]+)(.*)$/),start=e.cur(true)||0;if(parts){var end=parseFloat(parts[2]),unit=parts[3]||"px";if(unit!="px"){self.style[name]=(end||1)+unit;start=((end||1)/e.cur(true))*start;self.style[name]=start+unit;}if(parts[1])end=((parts[1]=="-="?-1:1)*end)+start;e.custom(start,end,unit);}else
e.custom(start,val,"");}});return true;});},stop:function(clearQueue,gotoEnd){var timers=jQuery.timers;if(clearQueue)this.queue([]);this.each(function(){for(var i=timers.length-1;i>=0;i--)if(timers[i].elem==this){if(gotoEnd)timers[i](true);timers.splice(i,1);}});if(!gotoEnd)this.dequeue();return this;}});jQuery.each({slideDown:genFx("show",1),slideUp:genFx("hide",1),slideToggle:genFx("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(name,props){jQuery.fn[name]=function(speed,callback){return this.animate(props,speed,callback);};});jQuery.extend({speed:function(speed,easing,fn){var opt=typeof speed==="object"?speed:{complete:fn||!fn&&easing||jQuery.isFunction(speed)&&speed,duration:speed,easing:fn&&easing||easing&&!jQuery.isFunction(easing)&&easing};opt.duration=jQuery.fx.off?0:typeof opt.duration==="number"?opt.duration:jQuery.fx.speeds[opt.duration]||jQuery.fx.speeds._default;opt.old=opt.complete;opt.complete=function(){if(opt.queue!==false)jQuery(this).dequeue();if(jQuery.isFunction(opt.old))opt.old.call(this);};return opt;},easing:{linear:function(p,n,firstNum,diff){return firstNum+diff*p;},swing:function(p,n,firstNum,diff){return((-Math.cos(p*Math.PI)/2)+0.5)*diff+firstNum;}},timers:[],fx:function(elem,options,prop){this.options=options;this.elem=elem;this.prop=prop;if(!options.orig)options.orig={};}});jQuery.fx.prototype={update:function(){if(this.options.step)this.options.step.call(this.elem,this.now,this);(jQuery.fx.step[this.prop]||jQuery.fx.step._default)(this);if((this.prop=="height"||this.prop=="width")&&this.elem.style)this.elem.style.display="block";},cur:function(force){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null))return this.elem[this.prop];var r=parseFloat(jQuery.css(this.elem,this.prop,force));return r&&r>-10000?r:parseFloat(jQuery.curCSS(this.elem,this.prop))||0;},custom:function(from,to,unit){this.startTime=now();this.start=from;this.end=to;this.unit=unit||this.unit||"px";this.now=this.start;this.pos=this.state=0;var self=this;function t(gotoEnd){return self.step(gotoEnd);}t.elem=this.elem;if(t()&&jQuery.timers.push(t)&&!timerId){timerId=setInterval(function(){var timers=jQuery.timers;for(var i=0;i<timers.length;i++)if(!timers[i]())timers.splice(i--,1);if(!timers.length){clearInterval(timerId);timerId=undefined;}},13);}},show:function(){this.options.orig[this.prop]=jQuery.attr(this.elem.style,this.prop);this.options.show=true;this.custom(this.prop=="width"||this.prop=="height"?1:0,this.cur());jQuery(this.elem).show();},hide:function(){this.options.orig[this.prop]=jQuery.attr(this.elem.style,this.prop);this.options.hide=true;this.custom(this.cur(),0);},step:function(gotoEnd){var t=now();if(gotoEnd||t>=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;var done=true;for(var i in this.options.curAnim)if(this.options.curAnim[i]!==true)done=false;if(done){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;this.elem.style.display=this.options.display;if(jQuery.css(this.elem,"display")=="none")this.elem.style.display="block";}if(this.options.hide)jQuery(this.elem).hide();if(this.options.hide||this.options.show)for(var p in this.options.curAnim)jQuery.attr(this.elem.style,p,this.options.orig[p]);this.options.complete.call(this.elem);}return false;}else{var n=t-this.startTime;this.state=n/this.options.duration;this.pos=jQuery.easing[this.options.easing||(jQuery.easing.swing?"swing":"linear")](this.state,n,0,1,this.options.duration);this.now=this.start+((this.end-this.start)*this.pos);this.update();}return true;}};jQuery.extend(jQuery.fx,{speeds:{slow:600,fast:200,_default:400},step:{opacity:function(fx){jQuery.attr(fx.elem.style,"opacity",fx.now);},_default:function(fx){if(fx.elem.style&&fx.elem.style[fx.prop]!=null)fx.elem.style[fx.prop]=fx.now+fx.unit;else
fx.elem[fx.prop]=fx.now;}}});if(document.documentElement["getBoundingClientRect"])jQuery.fn.offset=function(){if(!this[0])return{top:0,left:0};if(this[0]===this[0].ownerDocument.body)return jQuery.offset.bodyOffset(this[0]);var box=this[0].getBoundingClientRect(),doc=this[0].ownerDocument,body=doc.body,docElem=doc.documentElement,clientTop=docElem.clientTop||body.clientTop||0,clientLeft=docElem.clientLeft||body.clientLeft||0,top=box.top+(self.pageYOffset||jQuery.boxModel&&docElem.scrollTop||body.scrollTop)-clientTop,left=box.left+(self.pageXOffset||jQuery.boxModel&&docElem.scrollLeft||body.scrollLeft)-clientLeft;return{top:top,left:left};};else
jQuery.fn.offset=function(){if(!this[0])return{top:0,left:0};if(this[0]===this[0].ownerDocument.body)return jQuery.offset.bodyOffset(this[0]);jQuery.offset.initialized||jQuery.offset.initialize();var elem=this[0],offsetParent=elem.offsetParent,prevOffsetParent=elem,doc=elem.ownerDocument,computedStyle,docElem=doc.documentElement,body=doc.body,defaultView=doc.defaultView,prevComputedStyle=defaultView.getComputedStyle(elem,null),top=elem.offsetTop,left=elem.offsetLeft;while((elem=elem.parentNode)&&elem!==body&&elem!==docElem){computedStyle=defaultView.getComputedStyle(elem,null);top-=elem.scrollTop,left-=elem.scrollLeft;if(elem===offsetParent){top+=elem.offsetTop,left+=elem.offsetLeft;if(jQuery.offset.doesNotAddBorder&&!(jQuery.offset.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(elem.tagName)))top+=parseInt(computedStyle.borderTopWidth,10)||0,left+=parseInt(computedStyle.borderLeftWidth,10)||0;prevOffsetParent=offsetParent,offsetParent=elem.offsetParent;}if(jQuery.offset.subtractsBorderForOverflowNotVisible&&computedStyle.overflow!=="visible")top+=parseInt(computedStyle.borderTopWidth,10)||0,left+=parseInt(computedStyle.borderLeftWidth,10)||0;prevComputedStyle=computedStyle;}if(prevComputedStyle.position==="relative"||prevComputedStyle.position==="static")top+=body.offsetTop,left+=body.offsetLeft;if(prevComputedStyle.position==="fixed")top+=Math.max(docElem.scrollTop,body.scrollTop),left+=Math.max(docElem.scrollLeft,body.scrollLeft);return{top:top,left:left};};jQuery.offset={initialize:function(){if(this.initialized)return;var body=document.body,container=document.createElement('div'),innerDiv,checkDiv,table,td,rules,prop,bodyMarginTop=body.style.marginTop,html='<div style="position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;"><div></div></div><table style="position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;" cellpadding="0" cellspacing="0"><tr><td></td></tr></table>';rules={position:'absolute',top:0,left:0,margin:0,border:0,width:'1px',height:'1px',visibility:'hidden'};for(prop in rules)container.style[prop]=rules[prop];container.innerHTML=html;body.insertBefore(container,body.firstChild);innerDiv=container.firstChild,checkDiv=innerDiv.firstChild,td=innerDiv.nextSibling.firstChild.firstChild;this.doesNotAddBorder=(checkDiv.offsetTop!==5);this.doesAddBorderForTableAndCells=(td.offsetTop===5);innerDiv.style.overflow='hidden',innerDiv.style.position='relative';this.subtractsBorderForOverflowNotVisible=(checkDiv.offsetTop===-5);body.style.marginTop='1px';this.doesNotIncludeMarginInBodyOffset=(body.offsetTop===0);body.style.marginTop=bodyMarginTop;body.removeChild(container);this.initialized=true;},bodyOffset:function(body){jQuery.offset.initialized||jQuery.offset.initialize();var top=body.offsetTop,left=body.offsetLeft;if(jQuery.offset.doesNotIncludeMarginInBodyOffset)top+=parseInt(jQuery.curCSS(body,'marginTop',true),10)||0,left+=parseInt(jQuery.curCSS(body,'marginLeft',true),10)||0;return{top:top,left:left};}};jQuery.fn.extend({position:function(){var left=0,top=0,results;if(this[0]){var offsetParent=this.offsetParent(),offset=this.offset(),parentOffset=/^body|html$/i.test(offsetParent[0].tagName)?{top:0,left:0}:offsetParent.offset();offset.top-=num(this,'marginTop');offset.left-=num(this,'marginLeft');parentOffset.top+=num(offsetParent,'borderTopWidth');parentOffset.left+=num(offsetParent,'borderLeftWidth');results={top:offset.top-parentOffset.top,left:offset.left-parentOffset.left};}return results;},offsetParent:function(){var offsetParent=this[0].offsetParent||document.body;while(offsetParent&&(!/^body|html$/i.test(offsetParent.tagName)&&jQuery.css(offsetParent,'position')=='static'))offsetParent=offsetParent.offsetParent;return jQuery(offsetParent);}});jQuery.each(['Left','Top'],function(i,name){var method='scroll'+name;jQuery.fn[method]=function(val){if(!this[0])return null;return val!==undefined?this.each(function(){this==window||this==document?window.scrollTo(!i?val:jQuery(window).scrollLeft(),i?val:jQuery(window).scrollTop()):this[method]=val;}):this[0]==window||this[0]==document?self[i?'pageYOffset':'pageXOffset']||jQuery.boxModel&&document.documentElement[method]||document.body[method]:this[0][method];};});jQuery.each(["Height","Width"],function(i,name){var tl=i?"Left":"Top",br=i?"Right":"Bottom",lower=name.toLowerCase();jQuery.fn["inner"+name]=function(){return this[0]?jQuery.css(this[0],lower,false,"padding"):null;};jQuery.fn["outer"+name]=function(margin){return this[0]?jQuery.css(this[0],lower,false,margin?"margin":"border"):null;};var type=name.toLowerCase();jQuery.fn[type]=function(size){return this[0]==window?document.compatMode=="CSS1Compat"&&document.documentElement["client"+name]||document.body["client"+name]:this[0]==document?Math.max(document.documentElement["client"+name],document.body["scroll"+name],document.documentElement["scroll"+name],document.body["offset"+name],document.documentElement["offset"+name]):size===undefined?(this.length?jQuery.css(this[0],type):null):this.css(type,typeof size==="string"?size:size+"px");};});})();;var Drupal=Drupal||{'settings':{},'behaviors':{},'themes':{},'locale':{}};Drupal.jsEnabled=document.getElementsByTagName&&document.createElement&&document.createTextNode&&document.documentElement&&document.getElementById;Drupal.attachBehaviors=function(context){context=context||document;if(Drupal.jsEnabled){jQuery.each(Drupal.behaviors,function(){this(context);});}};Drupal.checkPlain=function(str){str=String(str);var replace={'&':'&amp;','"':'&quot;','<':'&lt;','>':'&gt;'};for(var character in replace){var regex=new RegExp(character,'g');str=str.replace(regex,replace[character]);}return str;};Drupal.t=function(str,args){if(Drupal.locale.strings&&Drupal.locale.strings[str]){str=Drupal.locale.strings[str];}if(args){for(var key in args){switch(key.charAt(0)){case'@':args[key]=Drupal.checkPlain(args[key]);break;case'!':break;case'%':default:args[key]=Drupal.theme('placeholder',args[key]);break;}str=str.replace(key,args[key]);}}return str;};Drupal.formatPlural=function(count,singular,plural,args){var args=args||{};args['@count']=count;var index=Drupal.locale.pluralFormula?Drupal.locale.pluralFormula(args['@count']):((args['@count']==1)?0:1);if(index==0){return Drupal.t(singular,args);}else if(index==1){return Drupal.t(plural,args);}else{args['@count['+index+']']=args['@count'];delete args['@count'];return Drupal.t(plural.replace('@count','@count['+index+']'));}};Drupal.theme=function(func){for(var i=1,args=[];i<arguments.length;i++){args.push(arguments[i]);}return(Drupal.theme[func]||Drupal.theme.prototype[func]).apply(this,args);};Drupal.parseJson=function(data){if((data.substring(0,1)!='{')&&(data.substring(0,1)!='[')){return{status:0,data:data.length?data:Drupal.t('Unspecified error')};}return eval('('+data+');');};Drupal.freezeHeight=function(){Drupal.unfreezeHeight();var div=document.createElement('div');$(div).css({position:'absolute',top:'0px',left:'0px',width:'1px',height:$('body').css('height')}).attr('id','freeze-height');$('body').append(div);};Drupal.unfreezeHeight=function(){$('#freeze-height').remove();};Drupal.encodeURIComponent=function(item,uri){uri=uri||location.href;item=encodeURIComponent(item).replace(/%2F/g,'/');return(uri.indexOf('?q=')!=-1)?item:item.replace(/%26/g,'%2526').replace(/%23/g,'%2523').replace(/\/\//g,'/%252F');};Drupal.getSelection=function(element){if(typeof(element.selectionStart)!='number'&&document.selection){var range1=document.selection.createRange();var range2=range1.duplicate();range2.moveToElementText(element);range2.setEndPoint('EndToEnd',range1);var start=range2.text.length-range1.text.length;var end=start+range1.text.length;return{'start':start,'end':end};}return{'start':element.selectionStart,'end':element.selectionEnd};};Drupal.ahahError=function(xmlhttp,uri){if(xmlhttp.status==200){if(jQuery.trim($(xmlhttp.responseText).text())){var message=Drupal.t("An error occurred. \n@uri\n@text",{'@uri':uri,'@text':xmlhttp.responseText});}else{var message=Drupal.t("An error occurred. \n@uri\n(no information available).",{'@uri':uri,'@text':xmlhttp.responseText});}}else{var message=Drupal.t("An HTTP error @status occurred. \n@uri",{'@uri':uri,'@status':xmlhttp.status});}return message;}
if(Drupal.jsEnabled){$(document.documentElement).addClass('js');document.cookie='has_js=1; path=/';$(document).ready(function(){Drupal.attachBehaviors(this);});}Drupal.theme.prototype={placeholder:function(str){return'<em>'+Drupal.checkPlain(str)+'</em>';}};;Drupal.locale={'pluralFormula':function($n){return Number((((($n%10)==1)&&(($n%100)!=11))?(0):((((($n%10)>=2)&&(($n%10)<=4))&&((($n%100)<10)||(($n%100)>=20)))?(1):2)));},'strings':{"Unspecified error":"Не специфичная ошибка","Save":"Сохранить","Your server has been successfully tested to support this feature.":"Ваш сервер был успешно протестирован и может использовать эту функцию","Your system configuration does not currently support this feature. The \x3ca href=\"http://drupal.org/node/15365\"\x3ehandbook page on Clean URLs\x3c/a\x3e has additional troubleshooting information.":"Конфигурация вашей системы на данный момент не поддерживает этой функции. Дополнительная информация доступна на \x3ca href=\"http://drupal.org/node/15365\"\x3eстраницы документации о Clean URLs\x3c/a\x3e.","Testing clean URLs...":"Тестирование чистых URL-ов...","Upload":"Загрузить","Only files with the following extensions are allowed: %files-allowed.":"Прикреплять можно только файлы с расширениями: %files-allowed.","Select all rows in this table":"Отметить все колонки таблицы","Deselect all rows in this table":"Снять отметку со всех колонок таблицы","Join summary":"Объединить анонс","Split summary at cursor":"Отделить анонс от основного материала","An HTTP error @status occurred. \n@uri":"Произошла HTTP ошибка @status. \\n@uri","Changes made in this table will not be saved until the form is submitted.":"Изменения, сделанные в списке не вступят в силу пока вы не сохраните их.","Drag to re-order":"Переместите для изменения порядка","An error occurred. \n@uri\n@text":"Возникла ошибка. \\n@uri\\n@text","An error occurred. \n@uri\n(no information available).":"Возникла ошибка. \r\n@uri\r\n(нет доступной информации).","The changes to these blocks will not be saved until the \x3cem\x3eSave blocks\x3c/em\x3e button is clicked.":"Изменения, сделанные в блоках не вступят в силу пока вы не нажмете кнопку \x3cem\x3eСохранить блоки\x3c/em\x3e.","Next":"Далее","jQuery UI Tabs: Mismatching fragment identifier.":"jQuery UI Tabs: Не совпадает идентификатор фрагмента.","jQuery UI Tabs: Not enough arguments to add tab.":"jQuery UI Tabs: Недостаточно аргументов для добавления вкладки.","An error occurred at @path.":"Произошла ошибка в @path.","Close":"Закрыть","Resize":"Изменить размеры","Create thumbnails":"Создать превью","unlimited":"Неограниченный","Directory %dir is loaded.":"Папка %dir загружена.","Directory %dir is empty.":"Папка \"%dir\" пуста.","File browsing is disabled in directory %dir.":"Просмотр файлов запрещен для папки %dir.","Do you want to refresh the current directory?":"Вы хотите обновить текущую папку?","Uploading %filename...":"Загрузка %filename...","Delete selected files?":"Удалить выбранные файлы?","Please select a thumbnail.":"Пожалуйста выберите превью.","Please specify dimensions within the allowed range that is from 1x1 to @dimensions.":"Пожалуйста укажите размер внутри разрешённого диапозона от 1x1 до @dimensions.","Please select a single file.":"Пожалуйста, выберите файл.","%filename is not an image.":"%filename не изображение.","Please select a file.":"Пожалуйста выберите файл.","You must select at least %num files.":"Вы должны выбрать хотя бы %num файлов.","You are not allowed to operate on more than %num files.":"Вам не разрешено управлять больше чем с %num файлами.","Send to @app":"Отправить для @app","Log messages":"Сообщения в лог","textarea":"textarea","You can\'t perform this operation.":"Вы не можете выполните эту операцию.","Inserting image into FCKeditor is allowed only in WYSIWYG mode":"Вставка изображения в FCKeditor разрешена лишь в режиме WYSIWYG","Error !msg":"Ошибка !msg","Manage directories":"Управление папками","You are not alllowed to create more than %num directories.":"Вам запрещено создавать папок больше %num.","%dirname is not a valid directory name. It should contain only alphanumeric characters, hyphen and underscore.":"%dirname - это неверное имя для папки. Оно должно содержать только буквы, цифры, дефисы или нижние подчеркивания.","Subdirectory %dir already exists.":"Подпапка %dir уже существует.","Subdirectory %dir does not exist.":"Папка %dir не существует.","Are you sure want to delete this subdirectory with all directories and files in it?":"Вы точно хотите удалить эту подпапку со всем содержимым?","New directory":"Новая папка","Directory name may contain only alphanumeric characters, hyphen and underscore.":"Имя папки может содержать только буквы, цифры, дефисы и нижние подчеркивания.","Directory %dir already exists.":"Папка %dir уже существует.","Save and send":"Сохранить и отправить","Save and send test":"Сохранить и отправить тест","Previous":"Предыдущий","Automatic alias":"Автоматические синонимы"}};;Drupal.behaviors.jquerymenu=function(context){jqm_showit=function(){$(this).children('.jqm_link_edit').fadeIn();}
jqm_hideit=function(){$(this).children('.jqm_link_edit').fadeOut();}
$('ul.jquerymenu li').hover(jqm_showit,jqm_hideit);$('ul.jquerymenu .active').parents('li').removeClass('closed').addClass('open');$('ul.jquerymenu .active').parents('li').children('span.parent').removeClass('closed').addClass('open');$('ul.jquerymenu .active').parents('li').removeClass('closed').addClass('open');$('ul.jquerymenu .active').parents('li').children('span.parent').removeClass('closed').addClass('open');jqm_mouseenter=function(momma1){if($(momma1).hasClass('closed')){if(Drupal.settings.jquerymenu.animate===1){$($(this).siblings('ul').children()).hide().fadeIn('3000');$(momma1).children('ul').slideDown('700');}$(momma1).removeClass('closed').addClass('open');$(this).removeClass('closed').addClass('open');}}
jqm_mouseleave=function(momma1){if($(momma1).hasClass('open')){if(Drupal.settings.jquerymenu.animate===1){$(momma1).children('ul').slideUp('700');$($(this).siblings('ul').children()).fadeOut('3000');}$(momma1).removeClass('open').addClass('closed');$(this).removeClass('open').addClass('closed');}}
var selector="li.parent span.parent";if(Drupal.settings.jquerymenu.click_to_expand){selector=selector+', li.parent > a';}if(Drupal.settings.jquerymenu.hover===1){$('ul.jquerymenu:not(.jquerymenu-processed)',context).addClass('jquerymenu-processed').each(function(){$(this).find(selector).hover(jqm_mouseenter(momma),jqm_mouseleave(momma));});$('ul.jquerymenu-processed span.parent').remove();}else if(Drupal.settings.jquerymenu.hover===0){$('ul.jquerymenu:not(.jquerymenu-processed)',context).addClass('jquerymenu-processed').each(function(){$(this).find(selector).click(function(){momma=$(this).parent();if($(momma).hasClass('closed')){if(Drupal.settings.jquerymenu.animate===1){$(momma).children('ul').slideDown('700');$($(this).siblings('ul').children()).hide().fadeIn('3000');}$(momma).removeClass('closed').addClass('open');$(this).removeClass('closed').addClass('open');return false;}else{if(Drupal.settings.jquerymenu.animate===1){$(momma).children('ul').slideUp('700');$($(this).siblings('ul').children()).fadeOut('3000');}$(momma).removeClass('open').addClass('closed');$(this).removeClass('open').addClass('closed');return false;}});});}};Drupal.behaviors.initThickboxAuto=function(context){$("ul.galleries a > img.image.image-thumbnail").parent().addClass("category");$(".node .content").each(function(i){var group="node-g"+i;TB_drupal_rewrite(this,group);});$("ul.images").each(function(i){var group="gallery-g"+i;TB_drupal_rewrite(this,group);});TB_drupal_rewrite(document,null);}
function TB_drupal_rewrite(context,group){$("a > img.image.image-thumbnail",context).parent().not(".thickbox").not(".category").each(function(i){var img=$(this).children("img");var title=$(this).attr("title")||img.attr("title")||img.attr("alt")||null;var settings=Drupal.settings.thickbox;if(settings.derivative=="_original"){var href=img.attr("src").replace(".thumbnail","");}else{var href=img.attr("src").replace(".thumbnail","."+settings.derivative);}$(this).attr({href:href,title:title,rel:group});$(this).addClass("thickbox");});};Drupal.behaviors.initThickbox=function(context){$('a,area,input',context).filter('.thickbox:not(.initThickbox-processed)').addClass('initThickbox-processed').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(caption,url,imageGroup){var settings=Drupal.settings.thickbox;tb_setBrowserExtra();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('<iframe id="TB_HideSelect"></iframe><div id="TB_overlay"></div><div id="TB_window"></div>');$('#TB_overlay').click(tb_remove);}}else{if(document.getElementById('TB_overlay')===null){$('body').append('<div id="TB_overlay"></div><div id="TB_window"></div>');$('#TB_overlay').click(tb_remove);}}if($.browserextra.macfirefox){$('#TB_overlay').addClass('TB_overlayMacFFBGHack');}else{$('#TB_overlay').addClass('TB_overlayBG');}if(caption===null){caption='';}$('body').append('<div id="TB_load"></div>');$('#TB_load').show();var baseURL;if(url.indexOf('?')!==-1){baseURL=url.substr(0,url.indexOf('?'));}else{baseURL=url;}var urlString=/\.jpg$|\.jpeg$|\.png$|\.gif$|\.bmp$/;var urlType=baseURL.toLowerCase().match(urlString);if(urlType=='.jpg'||urlType=='.jpeg'||urlType=='.png'||urlType=='.gif'||urlType=='.bmp'){TB_PrevCaption='';TB_PrevURL='';TB_PrevHTML='';TB_NextCaption='';TB_NextURL='';TB_NextHTML='';TB_imageCount='';TB_FoundURL=false;if(imageGroup){TB_TempArray=$('a[rel='+imageGroup+']').get();for(TB_Counter=0;((TB_Counter<TB_TempArray.length)&&(TB_NextHTML===''));TB_Counter++){var urlTypeTemp=TB_TempArray[TB_Counter].href.toLowerCase().match(urlString);if(!(TB_TempArray[TB_Counter].href==url)){if(TB_FoundURL){TB_NextCaption=TB_TempArray[TB_Counter].title;TB_NextURL=TB_TempArray[TB_Counter].href;TB_NextHTML='<span id="TB_next">&nbsp;&nbsp;<a href="#">'+settings.next+'</a></span>';}else{TB_PrevCaption=TB_TempArray[TB_Counter].title;TB_PrevURL=TB_TempArray[TB_Counter].href;TB_PrevHTML='<span id="TB_prev">&nbsp;&nbsp;<a href="#">'+settings.prev+'</a></span>';}}else{TB_FoundURL=true;if(TB_TempArray.length>1){TB_imageCount=settings.image_count.replace(/\!current/,(TB_Counter+1)).replace(/\!total/,TB_TempArray.length);}}}}imgPreloader=new Image();prevImg=new Image();nextImg=new Image();imgPreloader.onload=function(){imgPreloader.onload=null;var TB_Links=$('a[class*="thickbox"]');var i=-1;TB_Links.each(function(n){if(this.href==imgPreloader.src){i=n;}});if(i!=-1){if(i>0){prevImg.src=TB_Links[i-1].href;}if(i+1<TB_Links.length){nextImg.src=TB_Links[i+1].href;}}var pagesize=tb_getPageSize();var x=pagesize[0]-100;var y=pagesize[1]-100;var imageWidth=imgPreloader.width;var imageHeight=imgPreloader.height;if(imageWidth>x){imageHeight=imageHeight*(x/imageWidth);imageWidth=x;if(imageHeight>y){imageWidth=imageWidth*(y/imageHeight);imageHeight=y;}}else if(imageHeight>y){imageWidth=imageWidth*(y/imageHeight);imageHeight=y;if(imageWidth>x){imageHeight=imageHeight*(x/imageWidth);imageWidth=x;}}TB_WIDTH=imageWidth<320?350:imageWidth+30;TB_HEIGHT=imageHeight+60;$('#TB_window').append('<a href="" id="TB_ImageOff" title="'+settings.next_close+'"><img id="TB_Image" src="'+url+'" width="'+imageWidth+'" height="'+imageHeight+'" alt="'+caption+'" /></a><div id="TB_caption">'+caption+'<div id="TB_secondLine">'+TB_imageCount+TB_PrevHTML+TB_NextHTML+'</div></div><div id="TB_closeWindow"><a href="#" id="TB_closeWindowButton" title="'+settings.close+'">'+settings.close+'</a> '+settings.esc_key+'</div>');$('#TB_closeWindowButton').click(tb_remove);if(!(TB_PrevHTML==='')){function goPrev(){if($(document).unbind('click',goPrev)){$(document).unbind('click',goPrev);}$('#TB_window').remove();$('body').append('<div id="TB_window"></div>');tb_show(TB_PrevCaption,TB_PrevURL,imageGroup);return false;}$('#TB_prev').click(goPrev);}if(!(TB_NextHTML==='')){function goNext(){$('#TB_window').remove();$('body').append('<div id="TB_window"></div>');tb_show(TB_NextCaption,TB_NextURL,imageGroup);return false;}$('#TB_next').click(goNext);$('#TB_ImageOff').click(goNext);}else{$('#TB_ImageOff').click(tb_remove);}document.onkeydown=function(e){if(e==null){keycode=event.keyCode;escapeKey=27;}else if($.browser.safari||$.browser.opera){keycode=e.which;escapeKey=27;}else{keycode=e.keyCode;escapeKey=e.DOM_VK_ESCAPE;}key=String.fromCharCode(keycode).toLowerCase();if(key=='x'||key=='c'||keycode==escapeKey){tb_remove();}else if(key=='n'||keycode==39){if(!(TB_NextHTML=='')){document.onkeydown='';goNext();}}else if(key=='p'||keycode==37){if(!(TB_PrevHTML=='')){document.onkeydown='';goPrev();}}};tb_position();$('#TB_load').remove();$('#TB_window').css({display:'block',opacity:0}).animate({opacity:1},400);};imgPreloader.src=url;}else{var queryString=url.replace(/^[^\?]+\??/,'');var params=tb_parseQuery(queryString);TB_WIDTH=(params['width']*1)+30||630;TB_HEIGHT=(params['height']*1)+40||440;ajaxContentW=TB_WIDTH-30;ajaxContentH=TB_HEIGHT-45;if(url.indexOf('TB_iframe')!=-1){urlNoQuery=url.split('TB_');$('#TB_iframeContent').remove();if(params['modal']!='true'){$('#TB_window').append('<div id="TB_title"><div id="TB_ajaxWindowTitle">'+caption+'</div><div id="TB_closeAjaxWindow"><a href="#" id="TB_closeWindowButton" title="'+settings.close+'">'+settings.close+'</a> '+settings.esc_key+'</div></div><iframe frameborder="0" hspace="0" src="'+urlNoQuery[0]+'" id="TB_iframeContent" name="TB_iframeContent'+Math.round(Math.random()*1000)+'" onload="tb_showIframe()" style="width:'+(ajaxContentW+29)+'px;height:'+(ajaxContentH+17)+'px;"></iframe>');}else{$('#TB_overlay').unbind();$('#TB_window').append('<iframe frameborder="0" hspace="0" src="'+urlNoQuery[0]+'" id="TB_iframeContent" name="TB_iframeContent'+Math.round(Math.random()*1000)+'" onload="tb_showIframe()" style="width:'+(ajaxContentW+29)+'px;height:'+(ajaxContentH+17)+'px;"></iframe>');}}else{if($('#TB_window').css('display')!='block'){if(params['modal']!='true'){$('#TB_window').append('<div id="TB_title"><div id="TB_ajaxWindowTitle">'+caption+'</div><div id="TB_closeAjaxWindow"><a href="#" id="TB_closeWindowButton" title="'+settings.close+'">'+settings.close+'</a> '+settings.esc_key+'</div></div><div id="TB_ajaxContent" style="width:'+ajaxContentW+'px;height:'+ajaxContentH+'px"></div>');window.setTimeout("tb_focusFirstFormElement()",1000);}else{$('#TB_overlay').unbind();$('#TB_window').append('<div id="TB_ajaxContent" class="TB_modal" style="width:'+ajaxContentW+'px;height:'+ajaxContentH+'px;"></div>');}}else{$('#TB_ajaxContent')[0].style.width=ajaxContentW+'px';$('#TB_ajaxContent')[0].style.height=ajaxContentH+'px';$('#TB_ajaxContent')[0].scrollTop=0;$('#TB_ajaxWindowTitle').html(caption);}}$('#TB_closeWindowButton').click(tb_remove);if(url.indexOf('TB_inline')!=-1){$('#TB_ajaxContent').append($('#'+params['inlineId']).children());$('#TB_window').unload(function(){$('#'+params['inlineId']).append($('#TB_ajaxContent').children());});tb_position();$('#TB_load').remove();$('#TB_window').css({display:'block',opacity:0}).animate({opacity:1},400);}else if(url.indexOf('TB_iframe')!=-1){tb_position();if($.browser.safari||$.browserextra.iphone){$('#TB_load').remove();$('#TB_window').css({display:'block',opacity:0}).animate({opacity:1},400);}}else{$('#TB_ajaxContent').load(url+='&random='+(new Date().getTime()),function(){tb_position();$('#TB_load').remove();Drupal.attachBehaviors('#TB_ajaxContent');$('#TB_window').css({display:'block',opacity:0}).animate({opacity:1},400);});}}if(!params['modal']){document.onkeyup=function(e){if(e==null){keycode=event.keyCode;escapeKey=27;}else if($.browser.safari||$.browser.opera){keycode=e.which;escapeKey=27;}else{keycode=e.keyCode;escapeKey=e.DOM_VK_ESCAPE;}key=String.fromCharCode(keycode).toLowerCase();if(keycode==escapeKey){tb_remove();}};}}catch(e){}}function tb_showIframe(){$('#TB_load').remove();$('#TB_window').css({display:'block',opacity:0}).animate({opacity:1},400);}function tb_remove(){$('#TB_imageOff').unbind('click');$('#TB_overlay').unbind('click');$('#TB_closeWindowButton').unbind('click');$('#TB_window').fadeOut(400,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(!($.browserextra.msie6)){$('#TB_window').css({marginTop:'-'+parseInt((TB_HEIGHT/2),10)+'px'});}}function tb_parseQuery(query){var Params={};if(!query){return Params;}var Pairs=query.split(/[;&]/);for(var i=0;i<Pairs.length;i++){var KeyVal=Pairs[i].split('=');if(!KeyVal||KeyVal.length!=2){continue;}var key=unescape(KeyVal[0]);var val=unescape(KeyVal[1]);val=val.replace(/\+/g,' ');Params[key]=val;}return Params;}function tb_getPageSize(){var de=document.documentElement;var w=window.innerWidth||self.innerWidth||(de&&de.clientWidth)||document.body.clientWidth;var h=window.innerHeight||self.innerHeight||(de&&de.clientHeight)||document.body.clientHeight;arrayPageSize=[w,h];return arrayPageSize;}function tb_setBrowserExtra(){if($.browserextra){return;}var userAgent=navigator.userAgent.toLowerCase();$.browserextra={iphone:/iphone/.test(userAgent),msie6:/msie/.test(userAgent)&&!/opera/.test(userAgent)&&/msie 6\.0/.test(userAgent)&&!/msie 7\.0/.test(userAgent)&&!/msie 8\.0/.test(userAgent),macfirefox:/mac/.test(userAgent)&&/firefox/.test(userAgent)};}function tb_focusFirstFormElement(){$('#TB_window form input[type=text]:first').focus();};Drupal.dhtmlMenu={};Drupal.behaviors.dhtmlMenu=function(){if(Drupal.dhtmlMenu.init){return;}else{Drupal.dhtmlMenu.init=true;}var effects=Drupal.settings.dhtmlMenu;$('.collapsed').removeClass('expanded');if(!effects.siblings){var cookie=Drupal.dhtmlMenu.cookieGet();for(var i in cookie){var li=$('#dhtml_menu-'+cookie[i]).parents('li:first');if($(li).hasClass('collapsed')){Drupal.dhtmlMenu.toggleMenu(li);}}}$('ul.menu li.dhtml-menu:not(.leaf,.no-dhtml)').each(function(){var li=this;if(effects.clone){var ul=$(li).find('ul:first');if(ul.length){$(li).find('a:first').clone().prependTo(ul).wrap('<li class="leaf fake-leaf"></li>');}}if(effects.doubleclick){$(li).find('a:first').dblclick(function(e){window.location=this.href;});}$(li).find('a:first').click(function(e){Drupal.dhtmlMenu.toggleMenu($(li));return false;});});}
Drupal.dhtmlMenu.toggleMenu=function(li){var effects=Drupal.settings.dhtmlMenu;if($(li).hasClass('expanded')){if(effects.slide){$(li).find('ul:first').animate({height:'hide',opacity:'hide'},'1000');}else $(li).find('ul:first').css('display','none');if(effects.children){if(effects.slide){$(li).find('li.expanded').find('ul:first').animate({height:'hide',opacity:'hide'},'1000');}else $(li).find('li.expanded').find('ul:first').css('display','none');$(li).find('li.expanded').removeClass('expanded').addClass('collapsed')}$(li).removeClass('expanded').addClass('collapsed');}else{if(effects.slide){$(li).find('ul:first').animate({height:'show',opacity:'show'},'1000');}else $(li).find('ul:first').css('display','block');$(li).removeClass('collapsed').addClass('expanded');if(effects.siblings){var id=$(li).find('a:first').attr('id');$(li).find('li').addClass('own-children-temp');if(effects.relativity){var siblings=$(li).parent().find('li.expanded').not('.own-children-temp').not(':has(#'+id+')');}else{var siblings=$('ul.menu li.expanded').not('.own-children-temp').not(':has(#'+id+')');}if(!effects.children){$('li.collapsed li.expanded').addClass('sibling-children-temp');$(siblings).find('li.expanded').addClass('sibling-children-temp');siblings=$(siblings).not('.sibling-children-temp');}$('.own-children-temp, .sibling-children-temp').removeClass('own-children-temp').removeClass('sibling-children-temp');if(effects.slide){$(siblings).find('ul:first').animate({height:'hide',opacity:'hide'},'1000');}else $(siblings).find('ul:first').css('display','none');$(siblings).removeClass('expanded').addClass('collapsed');}}Drupal.dhtmlMenu.cookieSet();}
Drupal.dhtmlMenu.cookieGet=function(){var c=/dhtml_menu=(.*?)(;|$)/.exec(document.cookie);if(c){return c[1];}else return'';}
Drupal.dhtmlMenu.cookieSet=function(){var expanded=new Array();$('li.expanded').each(function(){expanded.push($(this).find('a:first').attr('id').substr(5));});document.cookie='dhtml_menu='+expanded.join(',')+';path=/';};function parse_url(url,param){param=param.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");url=url.replace(/&amp;/,"&");var regexS="[\\?&]"+param+"=([^&#]*)";var regex=new RegExp(regexS);var results=regex.exec(url);if(results===null){return"";}else{return results[1];}}function lightbox2_init_triggers(classes,rel_type,custom_class){if(classes==''||rel_type==0){return;}var settings=Drupal.settings.lightbox2;var link_target="";if(settings.node_link_target!==0){link_target='target="'+settings.node_link_target+'"';}$("a:has("+classes+")").each(function(i){if((!settings.disable_for_gallery_lists&&!settings.disable_for_acidfree_gallery_lists)||(!$(this).parents("td.giAlbumCell").attr("class")&&!$(this).parents(".galleries").length&&!$(this).parents(".acidfree-folder").length&&!$(this).parents(".acidfree-list").length)||($(this).parents(".galleries").length&&!settings.disable_for_gallery_lists)||(($(this).parents(".acidfree-folder").length||$(this).parents(".acidfree-list").length)&&!settings.disable_for_acidfree_gallery_lists)){var child=$(this).find(classes);if($(child).attr("class")&&!$(this).parents("div.acidfree-video").length){var alt=$(child).attr("alt");if(!alt){alt="";}var link_text=settings.node_link_text;var download_link_text=settings.download_link_text;var rewrite=1;var rel="lightbox";var lightframe=false;if(rel_type=="lightframe_ungrouped"){rel="lightframe[]";lightframe=true;}else if(rel_type=="lightframe"){lightframe=true;}else if(rel_type=="lightbox_ungrouped"){rel="lightbox[]";}if(rel_type!="lightbox_ungrouped"&&rel_type!="lightframe_ungrouped"){rel=rel_type+"["+$(child).attr("class")+"]";}var id=null;var href=$(child).attr("src");var download=null;var orig_href=$(this).attr("href");var pattern=new RegExp(settings.file_path);if(orig_href.match(pattern)){var lang_pattern=new RegExp(Drupal.settings.basePath+"\\w\\w\\/");orig_href=orig_href.replace(lang_pattern,Drupal.settings.basePath);}var frame_href=orig_href;if($(child).attr("class").match("flickr-photo-img")||$(child).attr("class").match("flickr-photoset-img")){href=$(child).attr("src").replace("_s.",".").replace("_t.",".").replace("_m.",".").replace("_b.",".");if(rel_type!="lightbox_ungrouped"&&rel_type!="lightframe_ungrouped"){rel=rel_type+"[flickr]";if($(child).parents("div.block-flickr").attr("class")){id=$(child).parents("div.block-flickr").attr("id");rel=rel_type+"["+id+"]";}}download=href;}else if($(child).filter("img[class*=img_assist_custom]").size()){if(settings.display_image_size!="original"){orig_href=orig_href.replace(/\+/," ");href=$(child).attr("src").replace(new RegExp("\\.img_assist_custom-[0-9]+x[0-9]+"),((settings.display_image_size==="")?settings.display_image_size:"."+settings.display_image_size));if(rel_type!="lightbox_ungrouped"&&rel_type!="lightframe_ungrouped"){rel=rel_type+"[node_images]";}if(lightframe){frame_href=orig_href+"/lightbox2";}}else{rewrite=0;}}else if($(child).attr("class").match("inline")){href=orig_href;}else if($(child).attr("class").match("ImageFrame_image")||$(child).attr("class").match("ImageFrame_none")){var thumb_id=parse_url(href,"g2_itemId");var new_id=parse_url(orig_href,"g2_itemId");if(new_id&&thumb_id){var g2pattern=new RegExp("g2_itemId="+thumb_id);var replacement="g2_itemId="+new_id;href=href.replace(g2pattern,replacement);}rel=rel_type+"[gallery2]";if($(child).parents("div.block-gallery").attr("class")){id=$(child).parents("div.block-gallery").attr("id");rel=rel_type+"["+id+"]";}download=href;}else if(settings.image_node_sizes!='()'&&!custom_class){if(settings.display_image_size!="original"){href=$(child).attr("src").replace(new RegExp(settings.image_node_sizes),((settings.display_image_size==="")?settings.display_image_size:"."+settings.display_image_size)).replace(/(image\/view\/\d+)(\/[\w\-]*)/,((settings.display_image_size==="")?"$1/_original":"$1/"+settings.display_image_size));if(rel_type!="lightbox_ungrouped"&&rel_type!="lightframe_ungrouped"){rel=rel_type+"[node_images]";if($(child).parents("div.block-multiblock,div.block-image").attr("class")){id=$(child).parents("div.block-multiblock,div.block-image").attr("id");rel=rel_type+"["+id+"]";}}download=$(child).attr("src").replace(new RegExp(settings.image_node_sizes),"").replace(/(image\/view\/\d+)(\/[\w\-]*)/,"$1/_original");if(lightframe){frame_href=orig_href+"/lightbox2";}}else{rewrite=0;}}var img_title=$(child).attr("title");if(!img_title){img_title=$(this).attr("title");if(!img_title){img_title=$(child).attr("alt");}$(child).attr({title:img_title});}if(lightframe){href=frame_href;}if(rewrite){if(!custom_class){var title_link="";if(link_text.length){title_link="<br /><br /><a href=\""+orig_href+"\" id=\"lightbox2-node-link-text\" "+link_target+" >"+link_text+"</a>";}if(download_link_text.length&&download){title_link=title_link+" - <a href=\""+download+"\" id=\"lightbox2-download-link-text\" target=\"_blank\">"+download_link_text+"</a>";}rel=rel+"["+img_title+title_link+"]";$(this).attr({rel:rel,href:href});}else{if(rel_type!="lightbox_ungrouped"&&rel_type!="lightframe_ungrouped"){rel=rel_type+"["+$(child).attr("class")+"]";if($(child).parents("div.block-image").attr("class")){id=$(child).parents("div.block-image").attr("id");rel=rel_type+"["+id+"]";}}rel=rel+"["+img_title+"]";$(this).attr({rel:rel,href:orig_href});}}}}});}function lightbox2_init_acidfree_video(){var settings=Drupal.settings.lightbox2;var link_target="";if(settings.node_link_target!==0){link_target='target="'+settings.node_link_target+'"';}var link_text=settings.node_link_text;var rel="lightframe";$("div.acidfree-video a").each(function(i){if(!settings.disable_for_acidfree_gallery_lists||(!$(this).parents(".acidfree-folder").length&&!$(this).parents(".acidfree-list").length)||(($(this).parents(".acidfree-folder").length||$(this).parents(".acidfree-list").length)&&!settings.disable_for_acidfree_gallery_lists)){var orig_href=$(this).attr("href");var href=orig_href+"/lightframevideo";var title=$(this).attr("title");var title_link="";if(link_text.length){title_link="<br /><a href=\""+orig_href+"\" id=\"lightbox2-node-link-text\" "+link_target+" >"+link_text+"</a>";}$(this).attr({rel:rel,title:title+title_link,href:href});}});}function lightbox2_image_nodes(){var settings=Drupal.settings.lightbox2;var img_assist=document.getElementById("img_assist_thumbs");if(!img_assist){lightbox2_init_triggers(settings.trigger_lightbox_classes,"lightbox_ungrouped");lightbox2_init_triggers(settings.custom_trigger_classes,settings.custom_class_handler,true);lightbox2_init_triggers(settings.trigger_lightbox_group_classes,"lightbox");lightbox2_init_triggers(settings.trigger_slideshow_classes,"lightshow");lightbox2_init_triggers(settings.trigger_lightframe_classes,"lightframe_ungrouped");lightbox2_init_triggers(settings.trigger_lightframe_group_classes,"lightframe");if(settings.enable_acidfree_videos){lightbox2_init_acidfree_video();}}}Drupal.behaviors.initAutoLightbox=function(context){lightbox2_image_nodes();};;var Lightvideo={startVideo:function(href){if(Lightvideo.checkKnownVideos(href)){return;}else if(href.match(/\.mov$/i)){if(navigator.plugins&&navigator.plugins.length){Lightbox.modalHTML='<object id="qtboxMovie" type="video/quicktime" codebase="http://www.apple.com/qtactivex/qtplugin.cab" data="'+href+'" width="'+Lightbox.modalWidth+'" height="'+Lightbox.modalHeight+'"><param name="allowFullScreen" value="true"></param><param name="src" value="'+href+'" /><param name="scale" value="aspect" /><param name="controller" value="true" /><param name="autoplay" value="true" /><param name="bgcolor" value="#000000" /><param name="enablejavascript" value="true" /></object>';}else{Lightbox.modalHTML='<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="http://www.apple.com/qtactivex/qtplugin.cab" width="'+Lightbox.modalWidth+'" height="'+Lightbox.modalHeight+'" id="qtboxMovie"><param name="allowFullScreen" value="true"></param><param name="src" value="'+href+'" /><param name="scale" value="aspect" /><param name="controller" value="true" /><param name="autoplay" value="true" /><param name="bgcolor" value="#000000" /><param name="enablejavascript" value="true" /></object>';}}else if(href.match(/\.wmv$/i)||href.match(/\.asx$/i)){Lightbox.modalHTML='<object NAME="Player" WIDTH="'+Lightbox.modalWidth+'" HEIGHT="'+Lightbox.modalHeight+'" align="left" hspace="0" type="application/x-oleobject" CLASSID="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6"><param name="allowFullScreen" value="true"></param><param NAME="URL" VALUE="'+href+'"></param><param NAME="AUTOSTART" VALUE="true"></param><param name="showControls" value="true"></param><embed WIDTH="'+Lightbox.modalWidth+'" HEIGHT="'+Lightbox.modalHeight+'" align="left" hspace="0" SRC="'+href+'" TYPE="application/x-oleobject" AUTOSTART="false"></embed></object>';}else{Lightbox.videoId=href;variables='';if(!href.match(/\.swf$/i)){href=Lightbox.flvPlayer+'?file='+href;if(Lightbox.flvFlashvars.length){variables=Lightbox.flvFlashvars;}}Lightvideo.createEmbed(href,"flvplayer","#ffffff",variables);}},createEmbed:function(href,id,color,variables){var bgcolor='bgcolor="'+color+'"';var flashvars='';if(variables){flashvars='flashvars="'+variables+'"';}Lightbox.modalHTML='<embed type="application/x-shockwave-flash" '+'src="'+href+'" '+'id="'+id+'" name="'+id+'" '+bgcolor+' '+'quality="high" wmode="transparent" '+flashvars+' '+'height="'+Lightbox.modalHeight+'" '+'width="'+Lightbox.modalWidth+'" '+'allowfullscreen="true" '+'></embed>';},checkKnownVideos:function(href){if(Lightvideo.checkYouTubeVideo(href)||Lightvideo.checkGoogleVideo(href)||Lightvideo.checkMySpaceVideo(href)||Lightvideo.checkLiveVideo(href)||Lightvideo.checkMetacafeVideo(href)||Lightvideo.checkIFilmSpikeVideo(href)){return true;}return false;},checkYouTubeVideo:function(href){var patterns=['youtube.com/v/([^"&]+)','youtube.com/watch\\?v=([^"&]+)','youtube.com/\\?v=([^"&]+)'];for(var i=0;i<patterns.length;i++){var pattern=new RegExp(patterns[i],"i");var results=pattern.exec(href);if(results!==null){Lightbox.videoId=results[1];var href="http://www.youtube.com/v/"+Lightbox.videoId;var variables='fs=1';if(Lightbox.flvFlashvars.length){variables=variables+'&'+Lightbox.flvFlashvars;href=href+'&'+variables;}Lightvideo.createEmbed(href,"flvvideo","#ffffff",variables);return true;}}return false;},checkGoogleVideo:function(href){var patterns=['http://video.google.[a-z]{2,4}/googleplayer.swf\\?docId=(-?\\d*)','http://video.google.[a-z]{2,4}/videoplay\\?docid=([^&]*)&','http://video.google.[a-z]{2,4}/videoplay\\?docid=(.*)'];for(var i=0;i<patterns.length;i++){var pattern=new RegExp(patterns[i],"i");var results=pattern.exec(href);if(results!==null){Lightbox.videoId=results[1];var href="http://video.google.com/googleplayer.swf?docId="+Lightbox.videoId+"&hl=en";var variables='fs=true';if(Lightbox.flvFlashvars.length){variables=variables+'&'+Lightbox.flvFlashvars;href=href+'&'+variables;}Lightvideo.createEmbed(href,"flvvideo","#ffffff",variables);return true;}}return false;},checkMetacafeVideo:function(href){var patterns=['metacafe.com/watch/(\.[^/]*)/(\.[^/]*)/','metacafe.com/watch/(\.[^/]*)/(\.*)','metacafe.com/fplayer/(\.[^/]*)/(\.[^.]*).'];for(var i=0;i<patterns.length;i++){var pattern=new RegExp(patterns[i],"i");var results=pattern.exec(href);if(results!==null){Lightbox.videoId=results[1];Lightvideo.createEmbed("http://www.metacafe.com/fplayer/"+Lightbox.videoId+"/.swf","flvvideo","#ffffff");return true;}}return false;},checkIFilmSpikeVideo:function(href){var patterns=['spike.com/video/[^/&"]*?/(\\d+)','ifilm.com/video/[^/&"]*?/(\\d+)','spike.com/video/([^/&"]*)','ifilm.com/video/([^/&"]*)'];for(var i=0;i<patterns.length;i++){var pattern=new RegExp(patterns[i],"i");var results=pattern.exec(href);if(results!==null){Lightbox.videoId=results[1];Lightvideo.createEmbed("http://www.spike.com/efp","flvvideo","#000","flvbaseclip="+Lightbox.videoId+"&amp;");return true;}}return false;},checkMySpaceVideo:function(href){var patterns=['src="myspace.com/index.cfm\\?fuseaction=vids.individual&videoid=([^&"]+)','myspace.com/index.cfm\\?fuseaction=vids.individual&videoid=([^&"]+)','src="myspacetv.com/index.cfm\\?fuseaction=vids.individual&videoid=([^&"]+)"','myspacetv.com/index.cfm\\?fuseaction=vids.individual&videoid=([^&"]+)'];for(var i=0;i<patterns.length;i++){var pattern=new RegExp(patterns[i],"i");var results=pattern.exec(href);if(results!==null){Lightbox.videoId=results[1];Lightvideo.createEmbed("http://lads.myspace.com/videos/vplayer.swf","flvvideo","#ffffff","m="+Lightbox.videoId);return true;}}return false;},checkLiveVideo:function(href){var patterns=['livevideo.com/flvplayer/embed/([^"]*)"','livevideo.com/video/[^/]*?/([^/]*)/','livevideo.com/video/([^/]*)/'];for(var i=0;i<patterns.length;i++){var pattern=new RegExp(patterns[i],"i");var results=pattern.exec(href);if(results!==null){Lightbox.videoId=results[1];Lightvideo.createEmbed("http://www.livevideo.com/flvplayer/embed/"+Lightbox.videoId,"flvvideo","#ffffff");return true;}}return false;}};;var Lightbox={auto_modal:false,overlayOpacity:0.8,overlayColor:'000',disableCloseClick:true,resizeSequence:0,resizeSpeed:'normal',fadeInSpeed:'normal',slideDownSpeed:'slow',minWidth:240,borderSize:10,boxColor:'fff',fontColor:'000',topPosition:'',infoHeight:20,alternative_layout:false,imageArray:[],imageNum:null,total:0,activeImage:null,inprogress:false,disableResize:false,disableZoom:false,isZoomedIn:false,rtl:false,loopItems:false,keysClose:['c','x',27],keysPrevious:['p',37],keysNext:['n',39],keysZoom:['z'],keysPlayPause:[32],slideInterval:5000,showPlayPause:true,autoStart:true,autoExit:true,pauseOnNextClick:false,pauseOnPrevClick:true,slideIdArray:[],slideIdCount:0,isSlideshow:false,isPaused:false,loopSlides:false,isLightframe:false,iframe_width:600,iframe_height:400,iframe_border:1,enableVideo:false,flvPlayer:'/flvplayer.swf',flvFlashvars:'',isModal:false,isVideo:false,videoId:false,modalWidth:400,modalHeight:400,modalHTML:null,initialize:function(){var s=Drupal.settings.lightbox2;Lightbox.overlayOpacity=s.overlay_opacity;Lightbox.overlayColor=s.overlay_color;Lightbox.disableCloseClick=s.disable_close_click;Lightbox.resizeSequence=s.resize_sequence;Lightbox.resizeSpeed=s.resize_speed;Lightbox.fadeInSpeed=s.fade_in_speed;Lightbox.slideDownSpeed=s.slide_down_speed;Lightbox.borderSize=s.border_size;Lightbox.boxColor=s.box_color;Lightbox.fontColor=s.font_color;Lightbox.topPosition=s.top_position;Lightbox.rtl=s.rtl;Lightbox.loopItems=s.loop_items;Lightbox.keysClose=s.keys_close.split(" ");Lightbox.keysPrevious=s.keys_previous.split(" ");Lightbox.keysNext=s.keys_next.split(" ");Lightbox.keysZoom=s.keys_zoom.split(" ");Lightbox.keysPlayPause=s.keys_play_pause.split(" ");Lightbox.disableResize=s.disable_resize;Lightbox.disableZoom=s.disable_zoom;Lightbox.slideInterval=s.slideshow_interval;Lightbox.showPlayPause=s.show_play_pause;Lightbox.showCaption=s.show_caption;Lightbox.autoStart=s.slideshow_automatic_start;Lightbox.autoExit=s.slideshow_automatic_exit;Lightbox.pauseOnNextClick=s.pause_on_next_click;Lightbox.pauseOnPrevClick=s.pause_on_previous_click;Lightbox.loopSlides=s.loop_slides;Lightbox.alternative_layout=s.use_alt_layout;Lightbox.iframe_width=s.iframe_width;Lightbox.iframe_height=s.iframe_height;Lightbox.iframe_border=s.iframe_border;Lightbox.enableVideo=s.enable_video;if(s.enable_video){Lightbox.flvPlayer=s.flvPlayer;Lightbox.flvFlashvars=s.flvFlashvars;}var layout_class=(s.use_alt_layout?'lightbox2-alt-layout':'lightbox2-orig-layout');var output='<div id="lightbox2-overlay" style="display: none;"></div>\
      <div id="lightbox" style="display: none;" class="'+layout_class+'">\
        <div id="outerImageContainer"></div>\
        <div id="imageDataContainer" class="clearfix">\
          <div id="imageData"></div>\
        </div>\
      </div>';var loading='<div id="loading"><a href="#" id="loadingLink"></a></div>';var modal='<div id="modalContainer" style="display: none;"></div>';var frame='<div id="frameContainer" style="display: none;"></div>';var imageContainer='<div id="imageContainer" style="display: none;"></div>';var details='<div id="imageDetails"></div>';var bottomNav='<div id="bottomNav"></div>';var image='<img id="lightboxImage" alt="" />';var hoverNav='<div id="hoverNav"><a id="prevLink" href="#"></a><a id="nextLink" href="#"></a></div>';var frameNav='<div id="frameHoverNav"><a id="framePrevLink" href="#"></a><a id="frameNextLink" href="#"></a></div>';var hoverNav='<div id="hoverNav"><a id="prevLink" title="'+Drupal.t('Previous')+'" href="#"></a><a id="nextLink" title="'+Drupal.t('Next')+'" href="#"></a></div>';var frameNav='<div id="frameHoverNav"><a id="framePrevLink" title="'+Drupal.t('Previous')+'" href="#"></a><a id="frameNextLink" title="'+Drupal.t('Next')+'" href="#"></a></div>';var caption='<span id="caption"></span>';var numberDisplay='<span id="numberDisplay"></span>';var close='<a id="bottomNavClose" title="'+Drupal.t('Close')+'" href="#"></a>';var zoom='<a id="bottomNavZoom" href="#"></a>';var zoomOut='<a id="bottomNavZoomOut" href="#"></a>';var pause='<a id="lightshowPause" title="'+Drupal.t('Pause Slideshow')+'" href="#" style="display: none;"></a>';var play='<a id="lightshowPlay" title="'+Drupal.t('Play Slideshow')+'" href="#" style="display: none;"></a>';$("body").append(output);$('#outerImageContainer').append(modal+frame+imageContainer+loading);if(!s.use_alt_layout){$('#imageContainer').append(image+hoverNav);$('#imageData').append(details+bottomNav);$('#imageDetails').append(caption+numberDisplay);$('#bottomNav').append(frameNav+close+zoom+zoomOut+pause+play);}else{$('#outerImageContainer').append(bottomNav);$('#imageContainer').append(image);$('#bottomNav').append(close+zoom+zoomOut);$('#imageData').append(hoverNav+details);$('#imageDetails').append(caption+numberDisplay+pause+play);}if(Lightbox.disableCloseClick){$('#lightbox2-overlay').click(function(){Lightbox.end();return false;}).hide();}$('#loadingLink, #bottomNavClose').click(function(){Lightbox.end('forceClose');return false;});$('#prevLink, #framePrevLink').click(function(){Lightbox.changeData(Lightbox.activeImage-1);return false;});$('#nextLink, #frameNextLink').click(function(){Lightbox.changeData(Lightbox.activeImage+1);return false;});$('#bottomNavZoom').click(function(){Lightbox.changeData(Lightbox.activeImage,true);return false;});$('#bottomNavZoomOut').click(function(){Lightbox.changeData(Lightbox.activeImage,false);return false;});$('#lightshowPause').click(function(){Lightbox.togglePlayPause("lightshowPause","lightshowPlay");return false;});$('#lightshowPlay').click(function(){Lightbox.togglePlayPause("lightshowPlay","lightshowPause");return false;});$('#prevLink, #nextLink, #framePrevLink, #frameNextLink').css({'paddingTop':Lightbox.borderSize+'px'});$('#imageContainer, #frameContainer, #modalContainer').css({'padding':Lightbox.borderSize+'px'});$('#outerImageContainer, #imageDataContainer, #bottomNavClose').css({'backgroundColor':'#'+Lightbox.boxColor,'color':'#'+Lightbox.fontColor});if(Lightbox.alternative_layout){$('#bottomNavZoom, #bottomNavZoomOut').css({'bottom':Lightbox.borderSize+'px','right':Lightbox.borderSize+'px'});}else if(Lightbox.rtl==1&&$.browser.msie){$('#bottomNavZoom, #bottomNavZoomOut').css({'left':'0px'});}if(s.force_show_nav){$('#prevLink, #nextLink').addClass("force_show_nav");}},initList:function(context){if(context==undefined||context==null){context=document;}$("a[rel^='lightbox']:not(.lightbox-processed), area[rel^='lightbox']:not(.lightbox-processed)",context).addClass('lightbox-processed').click(function(e){if(Lightbox.disableCloseClick){$('#lightbox').unbind('click');$('#lightbox').click(function(){Lightbox.end('forceClose');});}Lightbox.start(this,false,false,false,false);if(e.preventDefault){e.preventDefault();}return false;});$("a[rel^='lightshow']:not(.lightbox-processed), area[rel^='lightshow']:not(.lightbox-processed)",context).addClass('lightbox-processed').click(function(e){if(Lightbox.disableCloseClick){$('#lightbox').unbind('click');$('#lightbox').click(function(){Lightbox.end('forceClose');});}Lightbox.start(this,true,false,false,false);if(e.preventDefault){e.preventDefault();}return false;});$("a[rel^='lightframe']:not(.lightbox-processed), area[rel^='lightframe']:not(.lightbox-processed)",context).addClass('lightbox-processed').click(function(e){if(Lightbox.disableCloseClick){$('#lightbox').unbind('click');$('#lightbox').click(function(){Lightbox.end('forceClose');});}Lightbox.start(this,false,true,false,false);if(e.preventDefault){e.preventDefault();}return false;});if(Lightbox.enableVideo){$("a[rel^='lightvideo']:not(.lightbox-processed), area[rel^='lightvideo']:not(.lightbox-processed)",context).addClass('lightbox-processed').click(function(e){if(Lightbox.disableCloseClick){$('#lightbox').unbind('click');$('#lightbox').click(function(){Lightbox.end('forceClose');});}Lightbox.start(this,false,false,true,false);if(e.preventDefault){e.preventDefault();}return false;});}$("a[rel^='lightmodal']:not(.lightbox-processed), area[rel^='lightmodal']:not(.lightbox-processed)",context).addClass('lightbox-processed').click(function(e){$('#lightbox').unbind('click');$('#lightbox').addClass($(this).attr('class'));$('#lightbox').removeClass('lightbox-processed');Lightbox.start(this,false,false,false,true);if(e.preventDefault){e.preventDefault();}return false;});$("#lightboxAutoModal:not(.lightbox-processed)",context).addClass('lightbox-processed').click(function(e){Lightbox.auto_modal=true;$('#lightbox').unbind('click');Lightbox.start(this,false,false,false,true);if(e.preventDefault){e.preventDefault();}return false;});},start:function(imageLink,slideshow,lightframe,lightvideo,lightmodal){Lightbox.isPaused=!Lightbox.autoStart;Lightbox.toggleSelectsFlash('hide');var arrayPageSize=Lightbox.getPageSize();$("#lightbox2-overlay").hide().css({'width':'100%','zIndex':'10090','height':arrayPageSize[1]+'px','backgroundColor':'#'+Lightbox.overlayColor});if(lightvideo&&this.detectMacFF2()){$("#lightbox2-overlay").removeClass("overlay_default");$("#lightbox2-overlay").addClass("overlay_macff2");$("#lightbox2-overlay").css({'opacity':null});}else{$("#lightbox2-overlay").removeClass("overlay_macff2");$("#lightbox2-overlay").addClass("overlay_default");$("#lightbox2-overlay").css({'opacity':Lightbox.overlayOpacity});}$("#lightbox2-overlay").fadeIn(Lightbox.fadeInSpeed);Lightbox.isSlideshow=slideshow;Lightbox.isLightframe=lightframe;Lightbox.isVideo=lightvideo;Lightbox.isModal=lightmodal;Lightbox.imageArray=[];Lightbox.imageNum=0;var anchors=$(imageLink.tagName);var anchor=null;var rel_parts=Lightbox.parseRel(imageLink);var rel=rel_parts["rel"];var rel_group=rel_parts["group"];var title=(rel_parts["title"]?rel_parts["title"]:imageLink.title);var rel_style=null;var i=0;if(rel_parts["flashvars"]){Lightbox.flvFlashvars=Lightbox.flvFlashvars+'&'+rel_parts["flashvars"];}var alt=imageLink.title;if(!alt){var img=$(imageLink).find("img");if(img&&$(img).attr("alt")){alt=$(img).attr("alt");}else{alt=title;}}if($(imageLink).attr('id')=='lightboxAutoModal'){rel_style=rel_parts["style"];Lightbox.imageArray.push(['#lightboxAutoModal > *',title,alt,rel_style,1]);}else{if((rel=='lightbox'||rel=='lightshow')&&!rel_group){Lightbox.imageArray.push([imageLink.href,title,alt]);}else if(!rel_group){rel_style=rel_parts["style"];Lightbox.imageArray.push([imageLink.href,title,alt,rel_style]);}else{for(i=0;i<anchors.length;i++){anchor=anchors[i];if(anchor.href&&typeof(anchor.href)=="string"&&$(anchor).attr('rel')){var rel_data=Lightbox.parseRel(anchor);var anchor_title=(rel_data["title"]?rel_data["title"]:anchor.title);img_alt=anchor.title;if(!img_alt){var anchor_img=$(anchor).find("img");if(anchor_img&&$(anchor_img).attr("alt")){img_alt=$(anchor_img).attr("alt");}else{img_alt=title;}}if(rel_data["rel"]==rel){if(rel_data["group"]==rel_group){if(Lightbox.isLightframe||Lightbox.isModal||Lightbox.isVideo){rel_style=rel_data["style"];}Lightbox.imageArray.push([anchor.href,anchor_title,img_alt,rel_style]);}}}}for(i=0;i<Lightbox.imageArray.length;i++){for(j=Lightbox.imageArray.length-1;j>i;j--){if(Lightbox.imageArray[i][0]==Lightbox.imageArray[j][0]){Lightbox.imageArray.splice(j,1);}}}while(Lightbox.imageArray[Lightbox.imageNum][0]!=imageLink.href){Lightbox.imageNum++;}}}if(Lightbox.isSlideshow&&Lightbox.showPlayPause&&Lightbox.isPaused){$('#lightshowPlay').show();$('#lightshowPause').hide();}var arrayPageScroll=Lightbox.getPageScroll();var lightboxTop=arrayPageScroll[1]+(Lightbox.topPosition==''?(arrayPageSize[3]/10):Lightbox.topPosition)*1;var lightboxLeft=arrayPageScroll[0];$('#frameContainer, #modalContainer, #lightboxImage').hide();$('#hoverNav, #prevLink, #nextLink, #frameHoverNav, #framePrevLink, #frameNextLink').hide();$('#imageDataContainer, #numberDisplay, #bottomNavZoom, #bottomNavZoomOut').hide();$('#outerImageContainer').css({'width':'250px','height':'250px'});$('#lightbox').css({'zIndex':'10500','top':lightboxTop+'px','left':lightboxLeft+'px'}).show();Lightbox.total=Lightbox.imageArray.length;Lightbox.changeData(Lightbox.imageNum);},changeData:function(imageNum,zoomIn){if(Lightbox.inprogress===false){if(Lightbox.total>1&&((Lightbox.isSlideshow&&Lightbox.loopSlides)||(!Lightbox.isSlideshow&&Lightbox.loopItems))){if(imageNum>=Lightbox.total)imageNum=0;if(imageNum<0)imageNum=Lightbox.total-1;}if(Lightbox.isSlideshow){for(var i=0;i<Lightbox.slideIdCount;i++){window.clearTimeout(Lightbox.slideIdArray[i]);}}Lightbox.inprogress=true;Lightbox.activeImage=imageNum;if(Lightbox.disableResize&&!Lightbox.isSlideshow){zoomIn=true;}Lightbox.isZoomedIn=zoomIn;$('#loading').css({'zIndex':'10500'}).show();if(!Lightbox.alternative_layout){$('#imageContainer').hide();}$('#frameContainer, #modalContainer, #lightboxImage').hide();$('#hoverNav, #prevLink, #nextLink, #frameHoverNav, #framePrevLink, #frameNextLink').hide();$('#imageDataContainer, #numberDisplay, #bottomNavZoom, #bottomNavZoomOut').hide();if(!Lightbox.isLightframe&&!Lightbox.isVideo&&!Lightbox.isModal){$("#lightbox #imageDataContainer").removeClass('lightbox2-alt-layout-data');imgPreloader=new Image();imgPreloader.onerror=function(){Lightbox.imgNodeLoadingError(this);};imgPreloader.onload=function(){var photo=document.getElementById('lightboxImage');photo.src=Lightbox.imageArray[Lightbox.activeImage][0];photo.alt=Lightbox.imageArray[Lightbox.activeImage][2];var imageWidth=imgPreloader.width;var imageHeight=imgPreloader.height;var arrayPageSize=Lightbox.getPageSize();var targ={w:arrayPageSize[2]-(Lightbox.borderSize*2),h:arrayPageSize[3]-(Lightbox.borderSize*6)-(Lightbox.infoHeight*4)-(arrayPageSize[3]/10)};var orig={w:imgPreloader.width,h:imgPreloader.height};if(zoomIn!==true){var ratio=1.0;$('#bottomNavZoomOut, #bottomNavZoom').hide();if((orig.w>=targ.w||orig.h>=targ.h)&&orig.h&&orig.w){ratio=((targ.w/orig.w)<(targ.h/orig.h))?targ.w/orig.w:targ.h/orig.h;if(!Lightbox.disableZoom&&!Lightbox.isSlideshow){$('#bottomNavZoom').css({'zIndex':'10500'}).show();}}imageWidth=Math.floor(orig.w*ratio);imageHeight=Math.floor(orig.h*ratio);}else{$('#bottomNavZoom').hide();if((orig.w>=targ.w||orig.h>=targ.h)&&orig.h&&orig.w){if(!Lightbox.disableResize&&Lightbox.isSlideshow===false&&!Lightbox.disableZoom){$('#bottomNavZoomOut').css({'zIndex':'10500'}).show();}}}photo.style.width=(imageWidth)+'px';photo.style.height=(imageHeight)+'px';Lightbox.resizeContainer(imageWidth,imageHeight);imgPreloader.onload=function(){};};imgPreloader.src=Lightbox.imageArray[Lightbox.activeImage][0];imgPreloader.alt=Lightbox.imageArray[Lightbox.activeImage][2];}else if(Lightbox.isLightframe){$("#lightbox #imageDataContainer").addClass('lightbox2-alt-layout-data');var src=Lightbox.imageArray[Lightbox.activeImage][0];$('#frameContainer').html('<iframe id="lightboxFrame" style="display: none;" src="'+src+'"></iframe>');if($.browser.mozilla&&src.indexOf('.swf')!=-1){setTimeout(function(){document.getElementById("lightboxFrame").src=Lightbox.imageArray[Lightbox.activeImage][0];},1000);}if(!Lightbox.iframe_border){$('#lightboxFrame').css({'border':'none'});$('#lightboxFrame').attr('frameborder','0');}var iframe=document.getElementById('lightboxFrame');var iframeStyles=Lightbox.imageArray[Lightbox.activeImage][3];iframe=Lightbox.setStyles(iframe,iframeStyles);Lightbox.resizeContainer(parseInt(iframe.width,10),parseInt(iframe.height,10));}else if(Lightbox.isVideo||Lightbox.isModal){$("#lightbox #imageDataContainer").addClass('lightbox2-alt-layout-data');var container=document.getElementById('modalContainer');var modalStyles=Lightbox.imageArray[Lightbox.activeImage][3];container=Lightbox.setStyles(container,modalStyles);if(Lightbox.isVideo){Lightbox.modalHeight=parseInt(container.height,10)-10;Lightbox.modalWidth=parseInt(container.width,10)-10;Lightvideo.startVideo(Lightbox.imageArray[Lightbox.activeImage][0]);}Lightbox.resizeContainer(parseInt(container.width,10),parseInt(container.height,10));}}},imgNodeLoadingError:function(image){var s=Drupal.settings.lightbox2;var original_image=Lightbox.imageArray[Lightbox.activeImage][0];if(s.display_image_size!==""){original_image=original_image.replace(new RegExp("."+s.display_image_size),"");}Lightbox.imageArray[Lightbox.activeImage][0]=original_image;image.onerror=function(){Lightbox.imgLoadingError(image);};image.src=original_image;},imgLoadingError:function(image){var s=Drupal.settings.lightbox2;Lightbox.imageArray[Lightbox.activeImage][0]=s.default_image;image.src=s.default_image;},resizeContainer:function(imgWidth,imgHeight){imgWidth=(imgWidth<Lightbox.minWidth?Lightbox.minWidth:imgWidth);this.widthCurrent=$('#outerImageContainer').width();this.heightCurrent=$('#outerImageContainer').height();var widthNew=(imgWidth+(Lightbox.borderSize*2));var heightNew=(imgHeight+(Lightbox.borderSize*2));this.xScale=(widthNew/this.widthCurrent)*100;this.yScale=(heightNew/this.heightCurrent)*100;wDiff=this.widthCurrent-widthNew;hDiff=this.heightCurrent-heightNew;$('#modalContainer').css({'width':imgWidth,'height':imgHeight});if(Lightbox.resizeSequence){var animate1={width:widthNew};var animate2={height:heightNew};if(Lightbox.resizeSequence==2){animate1={height:heightNew};animate2={width:widthNew};}$('#outerImageContainer').animate(animate1,Lightbox.resizeSpeed).animate(animate2,Lightbox.resizeSpeed,'linear',function(){Lightbox.showData();});}else{$('#outerImageContainer').animate({'width':widthNew,'height':heightNew},Lightbox.resizeSpeed,'linear',function(){Lightbox.showData();});}if((hDiff===0)&&(wDiff===0)){if($.browser.msie){Lightbox.pause(250);}else{Lightbox.pause(100);}}var s=Drupal.settings.lightbox2;if(!s.use_alt_layout){$('#prevLink, #nextLink').css({'height':imgHeight+'px'});}$('#imageDataContainer').css({'width':widthNew+'px'});},showData:function(){$('#loading').hide();if(Lightbox.isLightframe||Lightbox.isVideo||Lightbox.isModal){Lightbox.updateDetails();if(Lightbox.isLightframe){$('#frameContainer').show();if($.browser.safari||Lightbox.fadeInSpeed===0){$('#lightboxFrame').css({'zIndex':'10500'}).show();}else{$('#lightboxFrame').css({'zIndex':'10500'}).fadeIn(Lightbox.fadeInSpeed);}}else{if(Lightbox.isVideo){$("#modalContainer").html(Lightbox.modalHTML).click(function(){return false;}).css('zIndex','10500').show();}else{var src=unescape(Lightbox.imageArray[Lightbox.activeImage][0]);if(Lightbox.imageArray[Lightbox.activeImage][4]){$(src).appendTo("#modalContainer");$('#modalContainer').css({'zIndex':'10500'}).show();}else{$("#modalContainer").hide().load(src,function(){$('#modalContainer').css({'zIndex':'10500'}).show();});}$('#modalContainer').unbind('click');}}}else{$('#imageContainer').show();if($.browser.safari||Lightbox.fadeInSpeed===0){$('#lightboxImage').css({'zIndex':'10500'}).show();}else{$('#lightboxImage').css({'zIndex':'10500'}).fadeIn(Lightbox.fadeInSpeed);}Lightbox.updateDetails();this.preloadNeighborImages();}Lightbox.inprogress=false;if(Lightbox.isSlideshow){if(!Lightbox.loopSlides&&Lightbox.activeImage==(Lightbox.total-1)){if(Lightbox.autoExit){Lightbox.slideIdArray[Lightbox.slideIdCount++]=setTimeout(function(){Lightbox.end('slideshow');},Lightbox.slideInterval);}}else{if(!Lightbox.isPaused&&Lightbox.total>1){Lightbox.slideIdArray[Lightbox.slideIdCount++]=setTimeout(function(){Lightbox.changeData(Lightbox.activeImage+1);},Lightbox.slideInterval);}}if(Lightbox.showPlayPause&&Lightbox.total>1&&!Lightbox.isPaused){$('#lightshowPause').show();$('#lightshowPlay').hide();}else if(Lightbox.showPlayPause&&Lightbox.total>1){$('#lightshowPause').hide();$('#lightshowPlay').show();}}var arrayPageSize=Lightbox.getPageSize();var arrayPageScroll=Lightbox.getPageScroll();var pageHeight=arrayPageSize[1];if(Lightbox.isZoomedIn&&arrayPageSize[1]>arrayPageSize[3]){var lightboxTop=(Lightbox.topPosition==''?(arrayPageSize[3]/10):Lightbox.topPosition)*1;pageHeight=pageHeight+arrayPageScroll[1]+lightboxTop;}$('#lightbox2-overlay').css({'height':pageHeight+'px','width':arrayPageSize[0]+'px'});if($.browser.mozilla){if(Lightbox.imageArray[Lightbox.activeImage][0].indexOf(".pdf")!=-1){setTimeout(function(){document.getElementById("lightboxFrame").src=Lightbox.imageArray[Lightbox.activeImage][0];},1000);}}},updateDetails:function(){$("#imageDataContainer").hide();var s=Drupal.settings.lightbox2;if(s.show_caption){var caption=Lightbox.filterXSS(Lightbox.imageArray[Lightbox.activeImage][1]);if(!caption)caption='';$('#caption').html(caption).css({'zIndex':'10500'}).show();}var numberDisplay=null;if(s.image_count&&Lightbox.total>1){var currentImage=Lightbox.activeImage+1;if(!Lightbox.isLightframe&&!Lightbox.isModal&&!Lightbox.isVideo){numberDisplay=s.image_count.replace(/\!current/,currentImage).replace(/\!total/,Lightbox.total);}else if(Lightbox.isVideo){numberDisplay=s.video_count.replace(/\!current/,currentImage).replace(/\!total/,Lightbox.total);}else{numberDisplay=s.page_count.replace(/\!current/,currentImage).replace(/\!total/,Lightbox.total);}$('#numberDisplay').html(numberDisplay).css({'zIndex':'10500'}).show();}else{$('#numberDisplay').hide();}$("#imageDataContainer").hide().slideDown(Lightbox.slideDownSpeed,function(){$("#bottomNav").show();});if(Lightbox.rtl==1){$("#bottomNav").css({'float':'left'});}Lightbox.updateNav();},updateNav:function(){$('#hoverNav').css({'zIndex':'10500'}).show();var prevLink='#prevLink';var nextLink='#nextLink';if(Lightbox.isSlideshow){if((Lightbox.total>1&&Lightbox.loopSlides)||Lightbox.activeImage!==0){$(prevLink).css({'zIndex':'10500'}).show().click(function(){if(Lightbox.pauseOnPrevClick){Lightbox.togglePlayPause("lightshowPause","lightshowPlay");}Lightbox.changeData(Lightbox.activeImage-1);return false;});}else{$(prevLink).hide();}if((Lightbox.total>1&&Lightbox.loopSlides)||Lightbox.activeImage!=(Lightbox.total-1)){$(nextLink).css({'zIndex':'10500'}).show().click(function(){if(Lightbox.pauseOnNextClick){Lightbox.togglePlayPause("lightshowPause","lightshowPlay");}Lightbox.changeData(Lightbox.activeImage+1);return false;});}else{$(nextLink).hide();}}else{if((Lightbox.isLightframe||Lightbox.isModal||Lightbox.isVideo)&&!Lightbox.alternative_layout){$('#frameHoverNav').css({'zIndex':'10500'}).show();$('#hoverNav').css({'zIndex':'10500'}).hide();prevLink='#framePrevLink';nextLink='#frameNextLink';}if((Lightbox.total>1&&Lightbox.loopItems)||Lightbox.activeImage!==0){$(prevLink).css({'zIndex':'10500'}).show().unbind().click(function(){Lightbox.changeData(Lightbox.activeImage-1);return false;});}else{$(prevLink).hide();}if((Lightbox.total>1&&Lightbox.loopItems)||Lightbox.activeImage!=(Lightbox.total-1)){$(nextLink).css({'zIndex':'10500'}).show().unbind().click(function(){Lightbox.changeData(Lightbox.activeImage+1);return false;});}else{$(nextLink).hide();}}if(!Lightbox.isModal){this.enableKeyboardNav();}},enableKeyboardNav:function(){$(document).bind("keydown",this.keyboardAction);},disableKeyboardNav:function(){$(document).unbind("keydown",this.keyboardAction);},keyboardAction:function(e){if(e===null){keycode=event.keyCode;escapeKey=27;}else{keycode=e.keyCode;escapeKey=e.DOM_VK_ESCAPE;}key=String.fromCharCode(keycode).toLowerCase();if(Lightbox.checkKey(Lightbox.keysClose,key,keycode)){Lightbox.end('forceClose');}else if(Lightbox.checkKey(Lightbox.keysPrevious,key,keycode)){if((Lightbox.total>1&&((Lightbox.isSlideshow&&Lightbox.loopSlides)||(!Lightbox.isSlideshow&&Lightbox.loopItems)))||Lightbox.activeImage!==0){Lightbox.changeData(Lightbox.activeImage-1);}}else if(Lightbox.checkKey(Lightbox.keysNext,key,keycode)){if((Lightbox.total>1&&((Lightbox.isSlideshow&&Lightbox.loopSlides)||(!Lightbox.isSlideshow&&Lightbox.loopItems)))||Lightbox.activeImage!=(Lightbox.total-1)){Lightbox.changeData(Lightbox.activeImage+1);}}else if(Lightbox.checkKey(Lightbox.keysZoom,key,keycode)&&!Lightbox.disableResize&&!Lightbox.disableZoom&&!Lightbox.isSlideshow&&!Lightbox.isLightframe){if(Lightbox.isZoomedIn){Lightbox.changeData(Lightbox.activeImage,false);}else if(!Lightbox.isZoomedIn){Lightbox.changeData(Lightbox.activeImage,true);}return false;}else if(Lightbox.checkKey(Lightbox.keysPlayPause,key,keycode)&&Lightbox.isSlideshow){if(Lightbox.isPaused){Lightbox.togglePlayPause("lightshowPlay","lightshowPause");}else{Lightbox.togglePlayPause("lightshowPause","lightshowPlay");}return false;}},preloadNeighborImages:function(){if((Lightbox.total-1)>Lightbox.activeImage){preloadNextImage=new Image();preloadNextImage.src=Lightbox.imageArray[Lightbox.activeImage+1][0];}if(Lightbox.activeImage>0){preloadPrevImage=new Image();preloadPrevImage.src=Lightbox.imageArray[Lightbox.activeImage-1][0];}},end:function(caller){var closeClick=(caller=='slideshow'?false:true);if(Lightbox.isSlideshow&&Lightbox.isPaused&&!closeClick){return;}if(Lightbox.inprogress===true&&caller!='forceClose'){return;}Lightbox.disableKeyboardNav();$('#lightbox').hide();$("#lightbox2-overlay").fadeOut();Lightbox.isPaused=true;Lightbox.inprogress=false;Lightbox.toggleSelectsFlash('visible');if(Lightbox.isSlideshow){for(var i=0;i<Lightbox.slideIdCount;i++){window.clearTimeout(Lightbox.slideIdArray[i]);}$('#lightshowPause, #lightshowPlay').hide();}else if(Lightbox.isLightframe){$('#frameContainer').empty().hide();}else if(Lightbox.isVideo||Lightbox.isModal){if(!Lightbox.auto_modal){$('#modalContainer').hide().html("");}Lightbox.auto_modal=false;}},getPageScroll:function(){var xScroll,yScroll;if(self.pageYOffset||self.pageXOffset){yScroll=self.pageYOffset;xScroll=self.pageXOffset;}else if(document.documentElement&&(document.documentElement.scrollTop||document.documentElement.scrollLeft)){yScroll=document.documentElement.scrollTop;xScroll=document.documentElement.scrollLeft;}else if(document.body){yScroll=document.body.scrollTop;xScroll=document.body.scrollLeft;}arrayPageScroll=[xScroll,yScroll];return arrayPageScroll;},getPageSize:function(){var xScroll,yScroll;if(window.innerHeight&&window.scrollMaxY){xScroll=window.innerWidth+window.scrollMaxX;yScroll=window.innerHeight+window.scrollMaxY;}else if(document.body.scrollHeight>document.body.offsetHeight){xScroll=document.body.scrollWidth;yScroll=document.body.scrollHeight;}else{xScroll=document.body.offsetWidth;yScroll=document.body.offsetHeight;}var windowWidth,windowHeight;if(self.innerHeight){if(document.documentElement.clientWidth){windowWidth=document.documentElement.clientWidth;}else{windowWidth=self.innerWidth;}windowHeight=self.innerHeight;}else if(document.documentElement&&document.documentElement.clientHeight){windowWidth=document.documentElement.clientWidth;windowHeight=document.documentElement.clientHeight;}else if(document.body){windowWidth=document.body.clientWidth;windowHeight=document.body.clientHeight;}if(yScroll<windowHeight){pageHeight=windowHeight;}else{pageHeight=yScroll;}if(xScroll<windowWidth){pageWidth=xScroll;}else{pageWidth=windowWidth;}arrayPageSize=new Array(pageWidth,pageHeight,windowWidth,windowHeight);return arrayPageSize;},pause:function(ms){var date=new Date();var curDate=null;do{curDate=new Date();}while(curDate-date<ms);},toggleSelectsFlash:function(state){if(state=='visible'){$("select.lightbox_hidden, embed.lightbox_hidden, object.lightbox_hidden").show();}else if(state=='hide'){$("select:visible, embed:visible, object:visible").not('#lightboxAutoModal select, #lightboxAutoModal embed, #lightboxAutoModal object').addClass("lightbox_hidden");$("select.lightbox_hidden, embed.lightbox_hidden, object.lightbox_hidden").hide();}},parseRel:function(link){var parts=[];parts["rel"]=parts["title"]=parts["group"]=parts["style"]=parts["flashvars"]=null;if(!$(link).attr('rel'))return parts;parts["rel"]=$(link).attr('rel').match(/\w+/)[0];if($(link).attr('rel').match(/\[(.*)\]/)){var info=$(link).attr('rel').match(/\[(.*?)\]/)[1].split('|');parts["group"]=info[0];parts["style"]=info[1];if(parts["style"]!=undefined&&parts["style"].match(/flashvars:\s?(.*?);/)){parts["flashvars"]=parts["style"].match(/flashvars:\s?(.*?);/)[1];}}if($(link).attr('rel').match(/\[.*\]\[(.*)\]/)){parts["title"]=$(link).attr('rel').match(/\[.*\]\[(.*)\]/)[1];}return parts;},setStyles:function(item,styles){item.width=Lightbox.iframe_width;item.height=Lightbox.iframe_height;item.scrolling="auto";if(!styles)return item;var stylesArray=styles.split(';');for(var i=0;i<stylesArray.length;i++){if(stylesArray[i].indexOf('width:')>=0){var w=stylesArray[i].replace('width:','');item.width=jQuery.trim(w);}else if(stylesArray[i].indexOf('height:')>=0){var h=stylesArray[i].replace('height:','');item.height=jQuery.trim(h);}else if(stylesArray[i].indexOf('scrolling:')>=0){var scrolling=stylesArray[i].replace('scrolling:','');item.scrolling=jQuery.trim(scrolling);}else if(stylesArray[i].indexOf('overflow:')>=0){var overflow=stylesArray[i].replace('overflow:','');item.overflow=jQuery.trim(overflow);}}return item;},togglePlayPause:function(hideId,showId){if(Lightbox.isSlideshow&&hideId=="lightshowPause"){for(var i=0;i<Lightbox.slideIdCount;i++){window.clearTimeout(Lightbox.slideIdArray[i]);}}$('#'+hideId).hide();$('#'+showId).show();if(hideId=="lightshowPlay"){Lightbox.isPaused=false;if(!Lightbox.loopSlides&&Lightbox.activeImage==(Lightbox.total-1)){Lightbox.end();}else if(Lightbox.total>1){Lightbox.changeData(Lightbox.activeImage+1);}}else{Lightbox.isPaused=true;}},triggerLightbox:function(rel_type,rel_group){if(rel_type.length){if(rel_group&&rel_group.length){$("a[rel^='"+rel_type+"\["+rel_group+"\]'], area[rel^='"+rel_type+"\["+rel_group+"\]']").eq(0).trigger("click");}else{$("a[rel^='"+rel_type+"'], area[rel^='"+rel_type+"']").eq(0).trigger("click");}}},detectMacFF2:function(){var ua=navigator.userAgent.toLowerCase();if(/firefox[\/\s](\d+\.\d+)/.test(ua)){var ffversion=new Number(RegExp.$1);if(ffversion<3&&ua.indexOf('mac')!=-1){return true;}}return false;},checkKey:function(keys,key,code){return(jQuery.inArray(key,keys)!=-1||jQuery.inArray(String(code),keys)!=-1);},filterXSS:function(str,allowed_tags){var output="";$.ajax({url:Drupal.settings.basePath+'system/lightbox2/filter-xss',data:{'string':str,'allowed_tags':allowed_tags},type:"POST",async:false,dataType:"json",success:function(data){output=data;}});return output;}};Drupal.behaviors.initLightbox=function(context){$('body:not(.lightbox-processed)',context).addClass('lightbox-processed').each(function(){Lightbox.initialize();return false;});Lightbox.initList(context);$('#lightboxAutoModal',context).triggerHandler('click');};;(function($){Drupal.Panels={};Drupal.Panels.autoAttach=function(){if($.browser.msie){$("div.panel-pane").hover(function(){$('div.panel-hide',this).addClass("panel-hide-hover");return true;},function(){$('div.panel-hide',this).removeClass("panel-hide-hover");return true;});$("div.admin-links").hover(function(){$(this).addClass("admin-links-hover");return true;},function(){$(this).removeClass("admin-links-hover");return true;});}};$(Drupal.Panels.autoAttach);})(jQuery);;(function($){jQuery.fn.pngFix=function(settings){settings=jQuery.extend({blankgif:'blank.gif'},settings);var ie55=(navigator.appName=="Microsoft Internet Explorer"&&parseInt(navigator.appVersion)==4&&navigator.appVersion.indexOf("MSIE 5.5")!=-1);var ie6=(navigator.appName=="Microsoft Internet Explorer"&&parseInt(navigator.appVersion)==4&&navigator.appVersion.indexOf("MSIE 6.0")!=-1);if(jQuery.browser.msie&&(ie55||ie6)){jQuery(this).find("img[src$=.png]").each(function(){jQuery(this).attr('width',jQuery(this).width());jQuery(this).attr('height',jQuery(this).height());var prevStyle='';var strNewHTML='';var imgId=(jQuery(this).attr('id'))?'id="'+jQuery(this).attr('id')+'" ':'';var imgClass=(jQuery(this).attr('class'))?'class="'+jQuery(this).attr('class')+'" ':'';var imgTitle=(jQuery(this).attr('title'))?'title="'+jQuery(this).attr('title')+'" ':'';var imgAlt=(jQuery(this).attr('alt'))?'alt="'+jQuery(this).attr('alt')+'" ':'';var imgAlign=(jQuery(this).attr('align'))?'float:'+jQuery(this).attr('align')+';':'';var imgHand=(jQuery(this).parent().attr('href'))?'cursor:hand;':'';if(this.style.border){prevStyle+='border:'+this.style.border+';';this.style.border='';}if(this.style.padding){prevStyle+='padding:'+this.style.padding+';';this.style.padding='';}if(this.style.margin){prevStyle+='margin:'+this.style.margin+';';this.style.margin='';}var imgStyle=(this.style.cssText);strNewHTML+='<span '+imgId+imgClass+imgTitle+imgAlt;strNewHTML+='style="position:relative;white-space:pre-line;display:inline-block;background:transparent;'+imgAlign+imgHand;strNewHTML+='width:'+jQuery(this).width()+'px;'+'height:'+jQuery(this).height()+'px;';strNewHTML+='filter:progid:DXImageTransform.Microsoft.AlphaImageLoader'+'(src=\''+jQuery(this).attr('src')+'\', sizingMethod=\'scale\');';strNewHTML+=imgStyle+'"></span>';if(prevStyle!=''){strNewHTML='<span style="position:relative;display:inline-block;'+prevStyle+imgHand+'width:'+jQuery(this).width()+'px;'+'height:'+jQuery(this).height()+'px;'+'">'+strNewHTML+'</span>';}jQuery(this).hide();jQuery(this).after(strNewHTML);});jQuery(this).find("*").each(function(){var bgIMG=jQuery(this).css('background-image');if(bgIMG.indexOf(".png")!=-1){var iebg=bgIMG.split('url("')[1].split('")')[0];jQuery(this).css('background-image','none');jQuery(this).get(0).runtimeStyle.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+iebg+"',sizingMethod='scale')";}});jQuery(this).find("input[src$=.png]").each(function(){var bgIMG=jQuery(this).attr('src');jQuery(this).get(0).runtimeStyle.filter='progid:DXImageTransform.Microsoft.AlphaImageLoader'+'(src=\''+bgIMG+'\', sizingMethod=\'scale\');';jQuery(this).attr('src',settings.blankgif)});}return jQuery;};})(jQuery);;Drupal.behaviors.webform_dynamic=function(context){$('document').ready(function(){var updateWebform=function(data){$('#divWebform').html(data.webform);$("#edit-submit").click(function(){if($(":radio[name='submitted[pool]']").filter(":checked").val()){return true;}alert("Необходимо выбрать одного кандидата!");return false;});}
if(document.getElementById('divWebform')){$.ajax({type:'POST',url:'/webform_dynamic/get/7139',success:updateWebform,dataType:'json',data:'js=1'});};return false;});};(function($){'use strict';var data=[{str:navigator.userAgent,sub:'Chrome',ver:'Chrome',name:'chrome'},{str:navigator.vendor,sub:'Apple',ver:'Version',name:'safari'},{prop:window.opera,ver:'Opera',name:'opera'},{str:navigator.userAgent,sub:'Firefox',ver:'Firefox',name:'firefox'},{str:navigator.userAgent,sub:'MSIE',ver:'MSIE',name:'ie'}];var v=function(s,n){var i=s.indexOf(data[n].ver);return(i!==-1)?parseInt(s.substring(i+data[n].ver.length+1),10):'';};var html=$('html');for(var n=0;n<data.length;n++){if((data[n].str&&(data[n].str.indexOf(data[n].sub)!==-1))||data[n].prop){html.addClass(data[n].name+' '+data[n].name+v(navigator.userAgent,n)||v(navigator.appVersion,n));break;}}html.addClass('desktop');})(jQuery);jQuery(function($){'use strict';var i,j,k,l,m;if(!$.browser.msie||parseInt($.browser.version,10)!==9){return;}var splitByTokens=function(str,startToken,endToken,last){if(!last){last=false;}var startPos=str.indexOf(startToken);if(startPos!==-1){startPos+=startToken.length;var endPos=last?str.lastIndexOf(endToken):str.indexOf(endToken,startPos);if(endPos!==-1&&endPos>startPos){return str.substr(startPos,endPos-startPos);}}return'';};var splitWithBrackets=function(str,token,brackets){if(!token){token=',';}if(!brackets){brackets='()';}var bracket=0;var startPos=0;var result=[];if(brackets.lenght<2){return result;}var pos=0;while(pos<str.length){var ch=str[pos];if(ch===brackets[0]){bracket++;}if(ch===brackets[1]){bracket--;}if(ch===token&&bracket<1){result.push(str.substr(startPos,pos-startPos));startPos=pos+token.length;}pos++;}result.push(str.substr(startPos,pos-startPos));return result;};var byteToHex=function(d){var hex=Number(d).toString(16);while(hex.length<2){hex="0"+hex;}return hex;};for(i=0;i<document.styleSheets.length;i++){var s=document.styleSheets[i];var r=[s];for(j=0;j<s.imports.length;j++){r.push(s.imports[j]);}for(j=0;j<r.length;j++){s=r[j];var n=[];for(k=0;k<s.rules.length;k++){var css=s.rules[k].cssText||s.rules[k].style.cssText;if(!css){continue;}var value=splitByTokens(css,'-svg-background:',';');if(value===''){continue;}var values=splitWithBrackets(value);for(l=0;l<values.length;l++){var g=splitByTokens(values[l],'linear-gradient(',')',true);if(g===''){continue;}var args=splitWithBrackets(g);if(args.length<3){continue;}var maxOffset=0;var stops=[];for(m=1;m<args.length;m++){var stopValues=splitWithBrackets($.trim(args[m]),' ');if(stopValues.length<2){continue;}var stopColor=$.trim(stopValues[0]);var stopOpacity=1;var colorRgba=splitByTokens(stopColor,'rgba(',')',true);var stopOffset=$.trim(stopValues[1]);if(colorRgba!==""){var rgba=colorRgba.split(',');if(rgba.length<4){continue;}stopColor='#'+byteToHex(rgba[0])+byteToHex(rgba[1])+byteToHex(rgba[2]);stopOpacity=rgba[3];}var isPx=stopOffset.indexOf('px')!==-1;if(isPx){maxOffset=Math.max(maxOffset,parseInt(stopOffset,10)||0);}stops.push({offset:stopOffset,color:stopColor,opacity:stopOpacity,isPx:isPx});}var stopsXML='';var lastStop=null;for(m=0;m<stops.length;m++){if(stops[m].isPx){stops[m].offset=((parseInt(stops[m].offset,10)||0)/(maxOffset/100))+'%';}stopsXML+='<stop offset="'+stops[m].offset+'" stop-color="'+stops[m].color+'" stop-opacity="'+stops[m].opacity+'"/>';if(m===stops.length-1){lastStop=stops[m];}}var isLeft=$.trim(args[0])==='left';var direction='x1="0%" y1="0%" '+(isLeft?'x2="100%" y2="0%"':'x2="0%" y2="100%"');var gradientLength='100%';if(maxOffset>0){gradientLength=maxOffset+'px';}var size=(isLeft?'width="'+gradientLength+'" height="100%"':'width="100%" height="'+gradientLength+'"');var last="";if(lastStop!==null&&maxOffset>0){last='<rect '+(isLeft?'x="'+maxOffset+'" y="0"':'x="0" y="'+maxOffset+'"')+' width="100%" height="100%" style="fill:'+lastStop.color+';opacity:'+lastStop.opacity+';"/>';}var svgGradient='<svg xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="none"><linearGradient id="g" gradientUnits="objectBoundingBox" '+direction+'>'+stopsXML+'</linearGradient><rect x="0" y="0" '+size+' fill="url(#g)" />'+last+'</svg>';values[l]=values[l].replace('linear-gradient('+g+')','url(data:image/svg+xml,'+escape(svgGradient)+')');}n.push({s:s.rules[k].selectorText,v:'background: '+values.join(",")});}for(k=0;k<n.length;k++){s.addRule(n[k].s,n[k].v);}}}});jQuery(function($){'use strict';if(!$.browser.msie||$.browser.version>8)return;function split(str){str=str.replace(/"/g,'').replace(/%20/g,'');return str.split(/\s*,\s*/);}$('.art-slider .art-slide-item').each(function(){var bgs=split($(this).css('background-image'));if(bgs.length>1){$(this).css("background-image",bgs[bgs.length-1]);}});});jQuery(function($){"use strict";if(!$.browser.msie||$.browser.version>8)return;$('.art-shapes').css('z-index',1);if(!$.browser.msie||$.browser.version>7)return;var textblockTexts=$('.art-textblock > div');textblockTexts.each(function(){var tbText=$(this);var valign=tbText.css('vertical-align')?tbText.css('vertical-align'):'top';if(valign==='middle'){var wrapper=tbText.wrap('<div/>').parent();tbText.css({'position':'relative','top':'-50%','height':'auto'});wrapper.css({'position':'absolute','top':'50%'});}else if(valign==='bottom'){tbText.css({'position':'absolute','height':'auto','bottom':0});}});});jQuery(function($){"use strict";$("iframe[src]").each(function(){var iframe=$(this);var src=iframe.attr("src");if(src==""){return;}if(src.lastIndexOf("?")!==-1){src+="&amp;wmode=transparent";}else{src+="?wmode=transparent";}iframe.attr("src",src);});});jQuery(function($){"use strict";$(window).bind("resize",function(){navigatorResizeHandler($("html").hasClass("responsive"));});});var navigatorResizeHandler=(function($){"use strict";return function(responsiveDesign){if(responsiveDesign)return;$(".art-slider").each(function(){var slider=$(this);var sliderWidth=slider.width();var nav=slider.siblings(".art-slidenavigator");if(nav.length){var left=nav.attr("data-left");var margin=sliderWidth-sliderWidth*parseFloat(left)/100-nav.outerWidth(false);if(margin<0){nav.css("margin-left",margin);}}});};})(jQuery);jQuery(window).bind("resize",(function($){"use strict";return function(){if(typeof responsiveDesign!=="undefined"&&responsiveDesign.isResponsive)return;var sheetLeft=$(".art-sheet").offset().left;$("header.art-header #art-flash-area").each(function(){var object=$(this);object.css("left",sheetLeft+"px");});};})(jQuery));jQuery(function($){"use strict";$('nav.art-nav').addClass("desktop-nav");});jQuery(function($){"use strict";if(!$.browser.msie||parseInt($.browser.version,10)>7){return;}$('ul.art-hmenu>li:not(:first-child)').each(function(){$(this).prepend('<span class="art-hmenu-separator"> </span>');});});jQuery(function($){"use strict";$("ul.art-hmenu a:not([href])").attr('href','#').click(function(e){e.preventDefault();});});jQuery(function($){"use strict";if(!$.browser.msie){return;}var ieVersion=parseInt($.browser.version,10);if(ieVersion>7){return;}$.each($("ul.art-hmenu ul"),function(){var maxSubitemWidth=0;var submenu=$(this);var subitem=null;$.each(submenu.children("li").children("a"),function(){subitem=$(this);var subitemWidth=subitem.outerWidth(false);if(maxSubitemWidth<subitemWidth){maxSubitemWidth=subitemWidth;}});if(subitem!==null){var subitemBorderLeft=parseInt(subitem.css("border-left-width"),10)||0;var subitemBorderRight=parseInt(subitem.css("border-right-width"),10)||0;var subitemPaddingLeft=parseInt(subitem.css("padding-left"),10)||0;var subitemPaddingRight=parseInt(subitem.css("padding-right"),10)||0;maxSubitemWidth-=subitemBorderLeft+subitemBorderRight+subitemPaddingLeft+subitemPaddingRight;submenu.children("li").children("a").css("width",maxSubitemWidth+"px");}});});jQuery(function(){"use strict";setHMenuOpenDirection({container:"div.art-sheet",defaultContainer:"#art-main",menuClass:"art-hmenu",leftToRightClass:"art-hmenu-left-to-right",rightToLeftClass:"art-hmenu-right-to-left"});});var setHMenuOpenDirection=(function($){"use strict";return(function(menuInfo){var defaultContainer=$(menuInfo.defaultContainer);defaultContainer=defaultContainer.length>0?defaultContainer=$(defaultContainer[0]):null;$("ul."+menuInfo.menuClass+">li>ul").each(function(){var submenu=$(this);var submenuWidth=submenu.outerWidth(false);var submenuLeft=submenu.offset().left;var mainContainer=submenu.parents(menuInfo.container);mainContainer=mainContainer.length>0?mainContainer=$(mainContainer[0]):null;var container=mainContainer||defaultContainer;if(container!==null){var containerLeft=container.offset().left;var containerWidth=container.outerWidth(false);if(submenuLeft+submenuWidth>=containerLeft+containerWidth){submenu.addClass(menuInfo.rightToLeftClass).find("ul").addClass(menuInfo.rightToLeftClass);}else if(submenuLeft<=containerLeft){submenu.addClass(menuInfo.leftToRightClass).find("ul").addClass(menuInfo.leftToRightClass);}}});});})(jQuery);jQuery(function($){'use strict';if($.browser.msie&&parseInt($.browser.version,10)<8){$(window).bind('resize',function(){var c=$('div.art-content');var s=c.parent().children('.art-layout-cell:not(.art-content)');var w=0;c.hide();s.each(function(){w+=$(this).outerWidth(true);});c.w=c.parent().width();c.css('width',c.w-w+'px');c.show();});}$(window).trigger('resize');});jQuery(function($){"use strict";if(!$('html').hasClass('ie7')){return;}$('ul.art-vmenu li:not(:first-child),ul.art-vmenu li li li:first-child,ul.art-vmenu>li>ul').each(function(){$(this).append('<div class="art-vmenu-separator"> </div><div class="art-vmenu-separator-bg"> </div>');});});var artButtonSetup=(function($){'use strict';return(function(className){$.each($("a."+className+", button."+className+", input."+className),function(i,val){var b=$(val);if(!b.hasClass('art-button')){b.addClass('art-button');}if(b.is('input')){b.val(b.val().replace(/^\s*/,'')).css('zoom','1');}b.mousedown(function(){var b=$(this);b.addClass("active");});b.mouseup(function(){var b=$(this);if(b.hasClass('active')){b.removeClass('active');}});b.mouseleave(function(){var b=$(this);if(b.hasClass('active')){b.removeClass('active');}});});});})(jQuery);jQuery(function(){'use strict';artButtonSetup("art-button");});jQuery(function($){'use strict';$('input.art-search-button, form.art-search input[type="submit"]').attr('value','');});var Control=(function($){'use strict';return(function(){this.init=function(label,type,callback){var chAttr=label.find('input[type="'+type+'"]').attr('checked');if(chAttr==='checked'){label.addClass('art-checked');}label.mouseleave(function(){$(this).removeClass('hovered').removeClass('active');});label.mouseover(function(){$(this).addClass('hovered').removeClass('active');});label.mousedown(function(event){if(event.which!==1){return;}$(this).addClass('active').removeClass('hovered');});label.mouseup(function(event){if(event.which!==1){return;}callback.apply(this);$(this).removeClass('active').addClass('hovered');});};});})(jQuery);jQuery(function($){'use strict';$('.art-pager').contents().filter(function(){return this.nodeType===this.TEXT_NODE;}).remove();});var fixRssIconLineHeight=(function($){"use strict";return function(className){$("."+className).css("line-height",$("."+className).height()+"px");};})(jQuery);jQuery(function($){"use strict";var rssIcons=$(".art-rss-tag-icon");if(rssIcons.length){fixRssIconLineHeight("art-rss-tag-icon");if($.browser.msie&&parseInt($.browser.version,10)<9){rssIcons.each(function(){if($.trim($(this).html())===""){$(this).css("vertical-align","middle");}});}}});(function($){'use strict';$.fn.mousewheel=function(fn){return this[fn?"bind":"trigger"]("wheel",fn);};$.event.special.wheel={setup:function(){$.event.add(this,wheelEvents,wheelHandler,{});},teardown:function(){$.event.remove(this,wheelEvents,wheelHandler);}};var wheelEvents=!$.browser.mozilla?"mousewheel":"DOMMouseScroll"+($.browser.version<"1.9"?" mousemove":"");function wheelHandler(event){switch(event.type){case"mousemove":return $.extend(event.data,{clientX:event.clientX,clientY:event.clientY,pageX:event.pageX,pageY:event.pageY});case"DOMMouseScroll":$.extend(event,event.data);event.delta=-event.detail/3;break;case"mousewheel":event.delta=event.wheelDelta/120;break;}event.type="wheel";return $.event.handle.call(this,event,event.delta);}})(jQuery);var ThemeLightbox=(function($){'use strict';return(function(){var current;var images=$(".art-lightbox");this.init=function(ctrl){$(".art-lightbox").live("click",{_ctrl:ctrl},function(e){if(e.data._ctrl===true&&!e.ctrlKey){return;}reload();current=images.index(this);show(this);});$(".art-lightbox-wrapper .arrow.left:not(.disabled)").live("click",function(){move(current-1);});$(".art-lightbox-wrapper .arrow.right:not(.disabled)").live("click",function(){move(current+1);});$(".art-lightbox-wrapper .active").live("click",function(){move(current+1);});$(".art-lightbox-wrapper .close").live("click",function(){close();});};function show(src){var closeBtn=$('<div class="close"><div class="cw"> </div><div class="ccw"> </div><div class="close-alt">&#10007;</div></div>').click(close);var imgContainer=$('.art-lightbox-wrapper');if(imgContainer.length===0){imgContainer=$('<div class="art-lightbox-wrapper">').css('line-height',$(window).height()+"px").appendTo($("body"));}var img=$('<img class="art-lightbox-image active" src="'+getFullImgSrc($(src).attr("src"))+'">');img.appendTo(imgContainer);showArrows();closeBtn.appendTo(imgContainer);showLoader(true);img.load(function(){showLoader(false);});img.error(function(){showLoader(false);img.attr("src",$(src).attr("src"));});bindMouse($(".art-lightbox-wrapper .arrow").add(img).add(imgContainer));}function reload(){images=$(".art-lightbox");}function move(index){if(index<0||index>=images.length){return;}showError(false);current=index;$(".art-lightbox-wrapper .art-lightbox-image:not(.active)").remove();var active=$(".art-lightbox-wrapper .active");var target=$('<img class="art-lightbox-image" alt="" src="'+getFullImgSrc($(images[current]).attr("src"))+'" />');active.after(target);showArrows();showLoader(true);bindMouse($(".art-lightbox-wrapper").add(target));target.load(function(){showLoader(false);active.removeClass("active");target.addClass("active");});target.error(function(){showLoader(false);active.removeClass("active");target.addClass("active");target.attr("src",$(images[current]).attr("src"));});}function showArrows(){if($(".art-lightbox-wrapper .arrow").length===0){$(".art-lightbox-wrapper").append($('<div class="arrow left"><div class="arrow-t ccw"> </div><div class="arrow-b cw"> </div><div class="arrow-left-alt">&#8592;</div></div>').css("top",$(window).height()/2-40));$(".art-lightbox-wrapper").append($('<div class="arrow right"><div class="arrow-t cw"> </div><div class="arrow-b ccw"> </div><div class="arrow-right-alt">&#8594;</div></div>').css("top",$(window).height()/2-40));}if(current===0){$(".art-lightbox-wrapper .arrow.left").addClass("disabled");}else{$(".art-lightbox-wrapper .arrow.left").removeClass("disabled");}if(current===images.length-1){$(".art-lightbox-wrapper .arrow.right").addClass("disabled");}else{$(".art-lightbox-wrapper .arrow.right").removeClass("disabled");}}function showError(enable){if(enable){$(".art-lightbox-wrapper").append($('<div class="lightbox-error">Данный контент невозможно загрузить.<br/>Пожалуйста, повторите попытку позже.</div>').css({"top":$(window).height()/2-60,"left":$(window).width()/2-170}));}else{$(".art-lightbox-wrapper .lightbox-error").remove();}}function showLoader(enable){if(!enable){$(".art-lightbox-wrapper .loading").remove();}else{$('<div class="loading"> </div>').css({"top":$(window).height()/2-16,"left":$(window).width()/2-16}).appendTo($(".art-lightbox-wrapper"));}}var close=function(){$(".art-lightbox-wrapper").remove();};function bindMouse(img){img.unbind("wheel").mousewheel(function(event,delta){delta=delta>0?1:-1;move(current+delta);event.preventDefault();});img.mousedown(function(e){if(e.which===2){close();}e.preventDefault();});}function getFullImgSrc(src){var fileName=src.substring(0,src.lastIndexOf('.'));var ext=src.substring(src.lastIndexOf('.'));src=fileName+"-large"+ext;return src;}});})(jQuery);jQuery(function(){'use strict';new ThemeLightbox().init();});(function($){'use strict';$.support.transition=(function(){var thisBody=document.body||document.documentElement,thisStyle=thisBody.style,support=thisStyle.transition!==undefined||thisStyle.WebkitTransition!==undefined||thisStyle.MozTransition!==undefined||thisStyle.MsTransition!==undefined||thisStyle.OTransition!==undefined;return support&&{event:(function(){var e="transitionend";if($.browser.opera){var version=parseFloat($.browser.version);e=version>=12?(version<12.50?"otransitionend":"transitionend"):"oTransitionEnd";}else if($.browser.webkit){e="webkitTransitionEnd";}return e;})(),prefix:(function(){var result;$.each($.browser,function(key,value){if(key==="version"){return true;}return(result={opera:"-o-",mozilla:"-moz-",webkit:"-webkit-",msie:"-ms-"}[key])?false:true;});return result||"";})()};})();window.BackgroundHelper=function(){var slides=[];var direction="next";var motion="horizontal";var width=0;var height=0;var multiplier=1;var transitionDuration="";this.init=function(motionType,dir,duration){direction=dir;motion=motionType;slides=[];width=0;height=0;multiplier=1;transitionDuration=duration;};this.processSlide=function(element,modify){this.updateSize(element,null);var pos=[];var bgPosition=element.css("background-position");var positions=bgPosition.split(",");$.each(positions,function(i){var position=$.trim(this);var point=position.split(" ");if(point.length>1){var x=parseInt(point[0],10);var y=parseInt(point[1],10);pos.push({x:x,y:y});}});slides.push({"images":element.css("background-image"),"sizes":element.css("background-size"),"positions":pos});if(modify)element.css("background-image","none");};this.updateSize=function(element,initialSize){width=element.outerWidth(false);height=element.outerHeight();if(initialSize&&parseInt(initialSize.width,10)!==0){multiplier=width/initialSize.width;if(motion==="fade"){$.each(element.children(),function(i){$(this).css("background-position",getCssPositions(slides[i].positions,{x:0,y:0}));});}}};this.setBackground=function(element,items){var bg=[];var sizes=[];$.each(items,function(i,o){bg.push(o.images);sizes.push(o.sizes);});element.css({"background-image":bg.join(", "),"background-size":sizes.join(", "),"background-repeat":"no-repeat"});};this.setPosition=function(element,items){var pos=[];$.each(items,function(i,o){pos.push(o.positions);});element.css({"background-position":pos.join(", ")});};this.current=function(index){return slides[index]||null;};this.next=function(index){var next;if(direction==="next"){next=(index+1)%slides.length;}else{next=index-1;if(next<0){next=slides.length-1;}}return slides[next];};this.items=function(prev,next,move){var prevItem={x:0,y:0};var nextItem={x:0,y:0};var isDirectionNext=direction==="next";if(motion==="horizontal"){nextItem.x=isDirectionNext?width:-width;nextItem.y=0;if(move){prevItem.x+=isDirectionNext?-width:width;nextItem.x+=isDirectionNext?-width:width;}}else if(motion==="vertical"){nextItem.x=0;nextItem.y=isDirectionNext?height:-height;if(move){prevItem.y+=isDirectionNext?-height:height;nextItem.y+=isDirectionNext?-height:height;}}var result=[];if(!!prev){result.push({images:prev.images,positions:getCssPositions(prev.positions,prevItem),sizes:prev.sizes});}if(!!next){result.push({images:next.images,positions:getCssPositions(next.positions,nextItem),sizes:next.sizes});}if(direction==="next"){result.reverse();}return result;};this.transition=function(container,on){container.css($.support.transition.prefix+"transition",on?transitionDuration+" ease-in-out background-position":"");};function getCssPositions(positions,offset){var result=[];if(positions===undefined){return"";}offset.x=offset.x||0;offset.y=offset.y||0;for(var i=0;i<positions.length;i++){result.push((positions[i].x*multiplier+offset.x)+"px "+(positions[i].y*multiplier+offset.y)+"px");}return result.join(", ");}};var Slider=function(element,settings){var interval=null;var active=false;var children=element.find(".active").parent().children();var last=false;var running=false;this.settings=$.extend({},{"animation":"horizontal","direction":"next","speed":600,"pause":2500,"auto":true,"repeat":true,"navigator":null,"clickevents":true,"hover":true,"helper":null},settings);this.move=function(direction,next){var activeItem=element.find(".active"),nextItem=next||activeItem[direction](),innerDirection=this.settings.direction==="next"?"forward":"back",reset=direction==="next"?"first":"last",moving=interval,slider=this,tmp;active=true;if(moving){this.stop(true);}if(!nextItem.length){nextItem=element.find(".art-slide-item")[reset]();if(!this.settings.repeat){last=true;active=false;return;}}if($.support.transition){nextItem.addClass(this.settings.direction);tmp=nextItem.get(0).offsetHeight;activeItem.addClass(innerDirection);nextItem.addClass(innerDirection);element.trigger("beforeSlide",children.length);element.one($.support.transition.event,function(){nextItem.removeClass(slider.settings.direction).removeClass(innerDirection).addClass("active");activeItem.removeClass("active").removeClass(innerDirection);active=false;setTimeout(function(){element.trigger("afterSlide",children.length);},0);});}else{element.trigger("beforeSlide",children.length);activeItem.removeClass("active");nextItem.addClass("active");active=false;element.trigger("afterSlide",children.length);}this.navigate(nextItem);if(moving){this.start();}};this.navigate=function(position){var index=children.index(position);$(this.settings.navigator).children().removeClass("active").eq(index).addClass("active");};this.to=function(index){var activeItem=element.find(".active"),children=activeItem.parent().children(),activeIndex=children.index(activeItem),slider=this;if(index>(children.length-1)||index<0){return;}if(active){return element.one("afterSlide",function(){slider.to(index);});}if(activeIndex===index){return;}this.move(index>activeIndex?"next":"prev",$(children[index]));};this.next=function(){if(!active){if(last){this.stop();return;}this.move("next");}};this.prev=function(){if(!active){if(last){this.stop();return;}this.move("prev");}};this.start=function(force){if(!!force){setTimeout($.proxy(this.next,this),10);}interval=setInterval($.proxy(this.next,this),this.settings.pause);running=true;};this.stop=function(pause){clearInterval(interval);interval=null;running=!!pause;active=false;};this.active=function(){return running;};this.moving=function(){return active;};this.navigate(children.filter(".active"));if(this.settings.clickevents){$(this.settings.navigator).on("click","a",{slider:this},function(event){var activeIndex=children.index(children.filter(".active"));var index=$(this).parent().children().index($(this));if(activeIndex!==index){event.data.slider.to(index);}event.preventDefault();});}if(this.settings.hover){var slider=this;element.add(this.settings.navigator).add(element.siblings(".art-shapes")).hover(function(){if(element.is(":visible")&&!last){slider.stop(true);}},function(){if(element.is(":visible")&&!last){slider.start();}});}};$.fn.slider=function(arg){return this.each(function(){var element=$(this),data=element.data("slider"),options=typeof arg==="object"&&arg;if(!data){data=new Slider(element,options);element.data("slider",data);}if(typeof arg==="string"&&data[arg]){data[arg]();}else if(data.settings.auto&&element.is(":visible")){data.start();}});};})(jQuery);jQuery(function($){"use strict";if(!$.browser.msie||parseInt($.browser.version,10)>8)return;var path="";var scripts=$("script[src*='script.js']");if(scripts.length>0){var src=scripts.last().attr('src');path=src.substr(0,src.indexOf("script.js"));}processHeaderMultipleBg(path);});var processHeaderMultipleBg=(function($){"use strict";return(function(path){var header=$(".art-header");var bgimages="".split(",");var bgpositions="".split(",");for(var i=bgimages.length-1;i>=0;i--){var bgimage=$.trim(bgimages[i]);if(bgimage==="")continue;if(path!==""){bgimage=bgimage.replace(/(url\(['"]?)/i,"$1"+path);}header.append("<div style=\"position:absolute;top:0;left:0;width:100%;height:100%;background:"+bgimage+" "+bgpositions[i]+" no-repeat\">");}header.css('background-image',"url('images/header.jpg')".replace(/(url\(['"]?)/i,"$1"+path));header.css('background-position',"center top");});})(jQuery);jQuery(function($){'use strict';$.each($('button'),function(i,button){button.buttonName=button.getAttribute('name');button.buttonValue=button.getAttribute('value');button.prevOnClick=button.onclick;if(button.outerHTML){var re=/\bvalue="([^"]+)"/i;button.buttonValue=re.test(button.outerHTML)?re.exec(button.outerHTML)[1]:button.buttonValue;}button.setAttribute("name","_"+button.buttonName);button.onclick=function(){if(this.prevOnClick){this.prevOnClick.apply(this);}var f=this;while(f.tagName.toLowerCase()!=="body"){if(f.tagName.toLowerCase()==="form"){var subButton=document.createElement("input");subButton.setAttribute("type","hidden");subButton.setAttribute("name",this.buttonName);subButton.setAttribute("value",this.buttonValue);f.appendChild(subButton);return true;}f=f.parentNode;}return false;};});});jQuery(function($){'use strict';var imgAssistElem=parent.document.getElementsByName("img_assist_header");if(null!==imgAssistElem&&imgAssistElem.length>0){imgAssistElem[0].scrolling="no";imgAssistElem[0].style.height="150px";}});jQuery(function($){'use strict';$('form.art-search input[type="submit"]').removeClass('art-button');var text=$('#block-system-main form.art-search #edit-basic .form-item  input[type="text"]');$('#block-system-main form.art-search #edit-basic input[type="submit"]').insertAfter(text).css('top','0').css('height',parseInt(text.css('height'),10));});jQuery(function($){'use strict';$('ul.art-hmenu a.active + ul, ul.art-vmenu a.active + ul, ul.art-hmenu a.active-trail + ul, ul.art-vmenu a.active-trail + ul').addClass('active');});jQuery(function($){'use strict';$('.art-pager a.active').removeClass('active');});jQuery(function($){'use strict';if($('#comment-form').parent().hasClass('art-commentsform'))return;$('#comment-form').wrap('<div/>').parent().addClass('art-commentsform art-postcontent');});;var responsiveDesign={isResponsive:false,isDesktop:false,isTablet:false,isPhone:false,windowWidth:0,responsive:(function($){"use strict";return function(){var html=$("html");this.windowWidth=$(window).width();var triggerEvent=false;var isRespVisible=$("#art-resp").is(":visible");if(isRespVisible&&!this.isResponsive){html.addClass("responsive").removeClass("desktop");this.isResponsive=true;this.isDesktop=false;triggerEvent=true;}else if(!isRespVisible&&!this.isDesktop){html.addClass("desktop").removeClass("responsive responsive-tablet responsive-phone");this.isResponsive=this.isTablet=this.isPhone=false;this.isDesktop=true;triggerEvent=true;}if(this.isResponsive){if($("#art-resp-t").is(":visible")&&!this.isTablet){html.addClass("responsive-tablet").removeClass("responsive-phone");this.isTablet=true;this.isPhone=false;triggerEvent=true;}else if($("#art-resp-m").is(":visible")&&!this.isPhone){html.addClass("responsive-phone").removeClass("responsive-tablet");this.isTablet=false;this.isPhone=true;triggerEvent=true;}}if(triggerEvent){$(window).trigger("responsive",this);}$(window).trigger("responsiveResize",this);};})(jQuery),initialize:(function($){"use strict";return function(){$("<div id=\"art-resp\"><div id=\"art-resp-m\"></div><div id=\"art-resp-t\"></div></div>").appendTo("body");var resizeTimeout;$(window).resize(function(){clearTimeout(resizeTimeout);resizeTimeout=setTimeout(function(){responsiveDesign.responsive();},25);});$(window).trigger("resize");};})(jQuery)};function responsiveAbsBg(responsiveDesign,el,bg){"use strict";if(bg.length===0)return;var desktopBgTop=bg.attr("data-bg-top");var desktopBgHeight=bg.attr("data-bg-height");if(responsiveDesign.isResponsive){if(typeof desktopBgTop==="undefined"||desktopBgTop===false){bg.attr("data-bg-top",bg.css("top"));bg.attr("data-bg-height",bg.css("height"));}var elTop=el.offset().top;var elHeight=el.outerHeight();bg.css("top",elTop+"px");bg.css("height",elHeight+"px");}else if(typeof desktopBgTop!=="undefined"&&desktopBgTop!==false){bg.css("top",desktopBgTop);bg.css("height",desktopBgHeight);bg.removeAttr("data-bg-top");bg.removeAttr("data-bg-height");}}var responsiveImages=(function($){"use strict";return function(responsiveDesign){$("img[width]").each(function(){var img=$(this),newWidth="",newMaxWidth="",newHeight="";if(responsiveDesign.isResponsive){newWidth="auto";newHeight="auto";newMaxWidth="100%";var widthAttr=img.attr("width");if(widthAttr!==null&&typeof(widthAttr)==="string"&&widthAttr.indexOf("%")===-1){newWidth="100%";newMaxWidth=parseInt($.trim(widthAttr),10)+"px";}}img.css("width",newWidth).css("max-width",newMaxWidth).css("height",newHeight);});};})(jQuery);var responsiveVideos=(function($){"use strict";return function(responsiveDesign){$("iframe,object,embed").each(function(){var obj=$(this);var container=obj.parent(".art-responsive-embed");if(responsiveDesign.isResponsive){if(container.length!==0)return;container=$("<div class=\"art-responsive-embed\">").insertBefore(obj);obj.appendTo(container);}else if(container.length>0){obj.insertBefore(container);container.remove();}});};})(jQuery);var responsiveTextblocks=(function($){"use strict";return function(slider,responsiveDesign){slider.find(".art-textblock").each(function(){if(parseInt(slider.attr("data-width"),10)===0){return true;}var tb=$(this);var c=slider.width()/slider.attr("data-width");tb.css({"height":"","width":"","top":"","margin-left":""});if(responsiveDesign.isResponsive){var tbHeight=parseInt(tb.css("height"),10);var tbWidth=parseInt(tb.css("width"),10);var tbTop=parseInt(tb.css("top"),10);var tbMargin=parseInt(tb.css("margin-left"),10);tb.add(tb.children()).css({"height":tbHeight*c,"width":tbWidth*c});tb.css("top",tbTop*c);tb.attr("style",function(i,s){return s+"margin-left: "+(tbMargin*c)+"px !important";});}});};})(jQuery);var responsiveSlider=(function($){"use strict";return function(responsiveDesign){$(".art-slider").each(function(){var s=$(this);responsiveTextblocks(s,responsiveDesign);if(!responsiveDesign.isResponsive){s.removeAttr("style");return;}var initialWidth=s.attr("data-width");var initialHeight=s.attr("data-height");var c=s.width()/initialWidth;var h=c*initialHeight;s.css("height",h+"px");var obj=s.data("slider");if(obj&&obj.settings.helper){var inner=s.find(".art-slider-inner");obj.settings.helper.updateSize(inner,{width:initialWidth,height:initialHeight});}});};})(jQuery);var responsiveCollages=(function($){"use strict";return function(responsiveDesign){$(".art-collage").each(function(){var collage=$(this);var parent=collage.closest(":not(.image-caption-wrapper, .art-collage)");var parentWidth=parent.width();var collageWidth=collage.width();var sliderOriginalWidth=collage.children(".art-slider").attr("data-width");if(responsiveDesign.isResponsive&&collageWidth>parentWidth){collage.add(collage.find(".art-slider")).add(collage.closest(".image-caption-wrapper")).css("width","100%");}else if(!responsiveDesign.isResponsive||collageWidth>sliderOriginalWidth){collage.add(collage.find(".art-slider")).add(collage.closest(".image-caption-wrapper")).css("width","");}});};})(jQuery);var responsiveNavigator=(function($){"use strict";return function(responsiveDesign){$(".art-slider").each(function(){var currentSlider=$(this);var currentSliderWidth=currentSlider.width();var sliderNavigator=currentSlider.siblings(".art-slidenavigator");if(sliderNavigator.length){if(responsiveDesign.isResponsive){var left=sliderNavigator.attr("data-left");var margin=currentSliderWidth-currentSliderWidth*parseFloat(left)/100-sliderNavigator.outerWidth(false);if(margin<0){sliderNavigator.css("margin-left",margin);}var sliderHeight=currentSlider.css("height");sliderNavigator.css("top","");var offset=parseInt(sliderNavigator.attr("data-offset")||0,10);sliderNavigator.css("top",parseInt(sliderNavigator.css("top"),10)-(currentSlider.attr("data-height")-parseInt(sliderHeight,10))+offset);}else{sliderNavigator.removeAttr("data-offset");sliderNavigator.removeAttr("style");}}});};})(jQuery);jQuery(window).bind("responsive",(function($){"use strict";return function(event,responsiveDesign){responsiveImages(responsiveDesign);responsiveVideos(responsiveDesign);if($.browser.msie&&$.browser.version<=8)return;if(responsiveDesign.isResponsive){$(window).on("responsiveResize.slider",function(){responsiveSlideshow(responsiveDesign);});}else{$(window).trigger("responsiveResize.slider");$(window).off("responsiveResize.slider");}};})(jQuery));function responsiveSlideshow(responsiveDesign){"use strict";responsiveCollages(responsiveDesign);responsiveSlider(responsiveDesign);responsiveNavigator(responsiveDesign);}var responsiveHeader=(function($){"use strict";return function(responsiveDesign){var header=$("header.art-header");var headerSlider=header.find(".art-slider");if(headerSlider.length){var firstSlide=headerSlider.find(".art-slide-item").first();var slidebg=firstSlide.css("background-image").split(",");var previousSibling=headerSlider.prev();var sliderNav=headerSlider.siblings(".art-slidenavigator");if(slidebg.length&&responsiveDesign.isResponsive){header.css("background-image",slidebg[slidebg.length-1]);header.css("min-height","0");if(previousSibling.is("nav.art-nav")){sliderNav.attr("data-offset",previousSibling.height());}}else{sliderNav.removeAttr("data-offset");header.removeAttr("style");}}};})(jQuery);jQuery(window).bind("responsiveResize",(function($){"use strict";return function(event,responsiveDesign){responsiveAbsBg(responsiveDesign,$(".art-header"),$("#art-header-bg"));};})(jQuery));jQuery(window).bind("responsive",(function($){"use strict";return function(event,responsiveDesign){if($.browser.msie&&$.browser.version<=8)return;if(responsiveDesign.isResponsive){$(window).on("responsiveResize.header",function(){responsiveHeader(responsiveDesign);});}else{$(window).trigger("responsiveResize.header");$(window).trigger("resize");$(window).off("responsiveResize.header");}};})(jQuery));jQuery(window).bind("responsiveResize",(function($){"use strict";return function(event,responsiveDesign){responsiveAbsBg(responsiveDesign,$("nav.art-nav"),$("#art-hmenu-bg"));};})(jQuery));jQuery(function($){$("<a href=\"#\" class=\"art-menu-btn\"><span></span><span></span><span></span></a>").insertBefore(".art-hmenu").click(function(e){var menu=$(this).next();if(menu.is(":visible")){menu.slideUp("fast",function(){$(this).removeClass("visible").css("display","");});}else{menu.slideDown("fast",function(){$(this).addClass("visible").css("display","");});}e.preventDefault();});});var responsiveLayoutCell=(function($){"use strict";return function(responsiveDesign){$(".art-content .art-content-layout-row,.art-footer .art-content-layout-row").each(function(){var row=$(this);var rowChildren=row.children(".art-layout-cell");if(rowChildren.length>1){if(responsiveDesign.isTablet){rowChildren.addClass("responsive-tablet-layout-cell").each(function(i){if((i+1)%2===0){$(this).after("<div class=\"cleared responsive-cleared\">");}});}else{rowChildren.removeClass("responsive-tablet-layout-cell");row.children(".responsive-cleared").remove();}}});};})(jQuery);jQuery(window).bind("responsive",function(event,responsiveDesign){"use strict";responsiveLayoutCell(responsiveDesign);});var responsiveLayoutCell=(function($){"use strict";return function(responsiveDesign){$(".art-content .art-content-layout-row,.art-footer .art-content-layout-row").each(function(){var row=$(this);var rowChildren=row.children(".art-layout-cell");if(rowChildren.length>1){if(responsiveDesign.isTablet){rowChildren.addClass("responsive-tablet-layout-cell").each(function(i){if((i+1)%2===0){$(this).after("<div class=\"cleared responsive-cleared\">");}});}else{rowChildren.removeClass("responsive-tablet-layout-cell");row.children(".responsive-cleared").remove();}}});};})(jQuery);jQuery(window).bind("responsive",function(event,responsiveDesign){"use strict";responsiveLayoutCell(responsiveDesign);});var responsiveLayoutCell=(function($){"use strict";return function(responsiveDesign){$(".art-content .art-content-layout-row,.art-footer .art-content-layout-row").each(function(){var row=$(this);var rowChildren=row.children(".art-layout-cell");if(rowChildren.length>1){if(responsiveDesign.isTablet){rowChildren.addClass("responsive-tablet-layout-cell").each(function(i){if((i+1)%2===0){$(this).after("<div class=\"cleared responsive-cleared\">");}});}else{rowChildren.removeClass("responsive-tablet-layout-cell");row.children(".responsive-cleared").remove();}}});};})(jQuery);jQuery(window).bind("responsive",function(event,responsiveDesign){"use strict";responsiveLayoutCell(responsiveDesign);});if(!jQuery.browser.msie||jQuery.browser.version>8){jQuery(responsiveDesign.initialize);};jQuery.cookie=function(name,value,options){if(typeof value!='undefined'){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].join('');}else{var cookieValue=null;if(document.cookie&&document.cookie!=''){var cookies=document.cookie.split(';');for(var i=0;i<cookies.length;i++){var cookie=jQuery.trim(cookies[i]);if(cookie.substring(0,name.length+1)==(name+'=')){cookieValue=decodeURIComponent(cookie.substring(name.length+1));break;}}}return cookieValue;}};;Drupal.behaviors.textResize=function(context){if(text_resize_scope){if($('#'+text_resize_scope).length>0){var element_to_resize=$('#'+text_resize_scope);}else if($('.'+text_resize_scope).length>0){var element_to_resize=$('.'+text_resize_scope);}else{var element_to_resize=$(text_resize_scope);}}else{if($('DIV.left-corner').length>0){var element_to_resize=$('DIV.left-corner');}else if($('#content-inner').length>0){var element_to_resize=$('#content-inner');}else if($('#squeeze > #content').length>0){var element_to_resize=$('#squeeze > #content');}}if($.cookie('text_resize')!=null){element_to_resize.css('font-size',parseFloat($.cookie('text_resize'))+'px');}else{}if(text_resize_line_height_allow){if($.cookie('text_resize_line_height')!=null){element_to_resize.css('line-height',parseFloat($.cookie('text_resize_line_height'))+'px');}}$('a.changer').click(function(){var currentFontSize=parseFloat(element_to_resize.css('font-size'),10);var current_line_height=parseFloat(element_to_resize.css('line-height'),10);if(this.id=='text_resize_increase'){var new_font_size=currentFontSize*1.2;if(text_resize_line_height_allow){var new_line_height=current_line_height*1.2;}if(new_font_size<=text_resize_maximum){$.cookie('text_resize',new_font_size,{path:'/'});if(text_resize_line_height_allow){$.cookie('text_resize_line_height',new_line_height,{path:'/'});}var allow_change=true;}else{$.cookie('text_resize',text_resize_maximum,{path:'/'});if(text_resize_line_height_allow){$.cookie('text_resize_line_height',text_resize_line_height_max,{path:'/'});}var reset_size_max=true;}}else if(this.id=='text_resize_decrease'){var new_font_size=currentFontSize/1.2;if(text_resize_line_height_allow){var new_line_height=current_line_height/1.2;}if(new_font_size>=text_resize_minimum){$.cookie('text_resize',new_font_size,{path:'/'});if(text_resize_line_height_allow){$.cookie('text_resize_line_height',new_line_height,{path:'/'});}var allow_change=true;}else{$.cookie('text_resize',text_resize_minimum,{path:'/'});if(text_resize_line_height_allow){$.cookie('text_resize_line_height',text_resize_line_height_min,{path:'/'});}var reset_size_min=true;}}else if(this.id=='text_resize_reset'){$.cookie('text_resize',text_resize_minimum,{path:'/'});if(text_resize_line_height_allow){$.cookie('text_resize_line_height',text_resize_line_height_min,{path:'/'});}var reset_size_min=true;}if(allow_change==true){element_to_resize.css('font-size',new_font_size+'px');if(text_resize_line_height_allow){element_to_resize.css('line-height',new_line_height+'px');}return false;}else if(reset_size_min==true){element_to_resize.css('font-size',text_resize_minimum+'px');if(text_resize_line_height_allow){element_to_resize.css('line-height',text_resize_line_height_min+'px');}return false;}else if(reset_size_max==true){element_to_resize.css('font-size',text_resize_maximum+'px');if(text_resize_line_height_allow){element_to_resize.css('line-height',text_resize_line_height_max+'px');}return false;}});};