﻿/* All code in this file is 
* Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) 
* and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
* Metadata - jQuery plugin for parsing metadata from elements (used by jquery.validate.js)
* Revision: $Id: jquery.metadata.js 4187 2007-12-16 17:15:27Z joern.zaefferer $
* Copyright (c) 2006 John Resig, Yehuda Katz, J?orn Zaefferer, Paul McLanahan
*/
;(function($){$.extend({metadata:{defaults:{type:'class',name:'metadata',cre:/({.*})/,single:'metadata'},setType:function(b,d){this.defaults.type=b;this.defaults.name=d},get:function(b,d){var c=$.extend({},this.defaults,d);if(!c.single.length)c.single='metadata';var a=$.data(b,c.single);if(a)return a;a="{}";if(c.type=="class"){var e=c.cre.exec(b.className);if(e)a=e[1]}else if(c.type=="elem"){if(!b.getElementsByTagName)return undefined;var f=b.getElementsByTagName(c.name);if(f.length)a=$.trim(f[0].innerHTML)}else if(b.getAttribute!=undefined){var g=b.getAttribute(c.name);if(g)a=g}if(a.indexOf('{')<0)a="{"+a+"}";a=eval("("+a+")");$.data(b,c.single,a);return a}}});
/* Returns the metadata object for the first member of the jQuery object.
 * @name metadata
 */
$.fn.metadata=function(a){return $.metadata.get(this[0],a)}})(jQuery);

/* [jquery.getUrlParam] - Version 2.1
 * Copyright (c) 2006-2007 Mathias Bank (http://www.mathias-bank.de)
 */
;jQuery.fn.extend({getUrlParam:function(d){d=escape(unescape(d));var c=new Array();var a=null;if($(this).attr("nodeName")=="#document"){if(window.location.search.search(d)>-1){a=window.location.search.substr(1,window.location.search.length).split("&")}}else if($(this).attr("src")!="undefined"){var b=$(this).attr("src");if(b.indexOf("?")>-1){var f=b.substr(b.indexOf("?")+1);a=f.split("&")}}else if($(this).attr("href")!="undefined"){var b=$(this).attr("href");if(b.indexOf("?")>-1){var f=b.substr(b.indexOf("?")+1);a=f.split("&")}}else{return null}if(a==null)return null;for(var e=0;e<a.length;e++){if(escape(unescape(a[e].split("=")[0]))==d){c.push(a[e].split("=")[1])}}if(c.length==0)return null;else if(c.length==1)return c[0];else return c}});

/*[jquery.checkbox] - Version 2.0.1
 * Copyright (c) 2006-2008 Sam Collett (http://www.texotela.co.uk)
 */
;jQuery.fn.toggleCheckboxes=function(filter,returnChecked){filter=filter||"*";returnChecked=returnChecked||false;var returnWhat=jQuery([]);this.each(function(){var checked=jQuery("input[@type=checkbox]",this).filter(filter).each(function(){this.checked=!this.checked}).filter(":checked");returnWhat=checked});if(!returnChecked){returnWhat=this}return returnWhat};jQuery.fn.checkCheckboxes=function(filter,returnChecked){filter=filter||"*";returnChecked=returnChecked||false;var returnWhat=jQuery([]);this.each(function(){var checked=jQuery("input[@type=checkbox]",this).filter(filter).each(function(){this.checked=true}).filter(":checked");returnWhat=checked});if(!returnChecked){returnWhat=this}return returnWhat};jQuery.fn.unCheckCheckboxes=function(filter,returnUnChecked){filter=filter||"*";returnUnChecked=returnUnChecked||false;var returnWhat=jQuery([]);this.each(function(){var unChecked=jQuery("input[@type=checkbox]",this).filter(filter).each(function(){this.checked=false}).filter(":not(:checked)");returnWhat=unChecked});if(!returnUnChecked){returnWhat=this}return returnWhat};jQuery.radioCheckboxGroup=function(name,filter){filter=filter||"*";var expression="input[@type=checkbox]";if(name){expression+="[@name="+name+"]"}var x=jQuery(expression).filter(filter);x.click(function(){x.not(this).each(function(){this.checked=false}).end()})};

/* Supersubs v0.2b - jQuery plugin
 * Copyright (c) 2008 Joel Birch
 */
;(function(a){a.fn.supersubs=function(i){var g=a.extend({},a.fn.supersubs.defaults,i);return this.each(function(){var e=a(this);var c=a.meta?a.extend({},g,e.data()):g;var j=a('<li id="menu-fontsize">&#8212;</li>').css({'padding':0,'position':'absolute','top':'-999em','width':'auto'}).appendTo(e).width();a('#menu-fontsize').remove();$ULs=e.find('ul');$ULs.each(function(k){var f=$ULs.eq(k);var d=f.children();var l=d.children('a');var m=d.css('white-space','nowrap').css('float');var b=f.add(d).add(l).css({'float':'none','width':'auto'}).end().end()[0].clientWidth/j;b+=c.extraWidth;if(b>c.maxWidth){b=c.maxWidth}else if(b<c.minWidth){b=c.minWidth}b+='em';f.css('width',b);d.css({'float':m,'width':'100%','white-space':'normal'}).each(function(){var h=a('>ul',this);var n=h.css('left')!==undefined?'left':'right';h.css(n,b)})})})};a.fn.supersubs.defaults={minWidth:9,maxWidth:25,extraWidth:0}})(jQuery);

/* hoverIntent r5 // 2007.03.27 // jQuery 1.1.2+ by Brian Cherne
 * <http://cherne.net/brian/resources/jquery.hoverIntent.html>
 */
;(function($){$.fn.hoverIntent=function(f,g){var cfg={sensitivity:7,interval:100,timeout:0};cfg=$.extend(cfg,g?{over:f,out:g}:f);var cX,cY,pX,pY;var track=function(ev){cX=ev.pageX;cY=ev.pageY};var compare=function(ev,ob){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);if((Math.abs(pX-cX)+Math.abs(pY-cY))<cfg.sensitivity){$(ob).unbind("mousemove",track);ob.hoverIntent_s=1;return cfg.over.apply(ob,[ev])}else{pX=cX;pY=cY;ob.hoverIntent_t=setTimeout(function(){compare(ev,ob)},cfg.interval)}};var delay=function(ev,ob){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);ob.hoverIntent_s=0;return cfg.out.apply(ob,[ev])};var handleHover=function(e){var p=(e.type=="mouseover"?e.fromElement:e.toElement)||e.relatedTarget;while(p&&p!=this){try{p=p.parentNode}catch(e){p=this}}if(p==this){return false}var ev=jQuery.extend({},e);var ob=this;if(ob.hoverIntent_t){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t)}if(e.type=="mouseover"){pX=ev.pageX;pY=ev.pageY;$(ob).bind("mousemove",track);if(ob.hoverIntent_s!=1){ob.hoverIntent_t=setTimeout(function(){compare(ev,ob)},cfg.interval)}}else{$(ob).unbind("mousemove",track);if(ob.hoverIntent_s==1){ob.hoverIntent_t=setTimeout(function(){delay(ev,ob)},cfg.timeout)}}};return this.mouseover(handleHover).mouseout(handleHover)}})(jQuery);

/* Superfish v1.4.8 - jQuery menu widget
 * Copyright (c) 2008 Joel Birch
 */
;(function(b){b.fn.superfish=function(m){var f=b.fn.superfish,h=f.c,n=b(['<span class="',h.arrowClass,'"> &#187;</span>'].join('')),i=function(){var a=b(this),d=k(a);clearTimeout(d.sfTimer);a.showSuperfishUl().siblings().hideSuperfishUl()},l=function(){var a=b(this),d=k(a),c=f.op;clearTimeout(d.sfTimer);d.sfTimer=setTimeout(function(){c.retainPath=(b.inArray(a[0],c.$path)>-1);a.hideSuperfishUl();if(c.$path.length&&a.parents(['li.',c.hoverClass].join('')).length<1){i.call(c.$path)}},c.delay)},k=function(a){var d=a.parents(['ul.',h.menuClass,':first'].join(''))[0];f.op=f.o[d.serial];return d},o=function(a){a.addClass(h.anchorClass).append(n.clone())};return this.each(function(){var c=this.serial=f.o.length;var g=b.extend({},f.defaults,m);g.$path=b('li.'+g.pathClass,this).slice(0,g.pathLevels).each(function(){b(this).addClass([g.hoverClass,h.bcClass].join(' ')).filter('li:has(ul)').removeClass(g.pathClass)});f.o[c]=f.op=g;b('li:has(ul)',this)[(b.fn.hoverIntent&&!g.disableHI)?'hoverIntent':'hover'](i,l).each(function(){if(g.autoArrows)o(b('>a:first-child',this))}).not('.'+h.bcClass).hideSuperfishUl();var j=b('a',this);j.each(function(a){var d=j.eq(a).parents('li');j.eq(a).focus(function(){i.call(d)}).blur(function(){l.call(d)})});g.onInit.call(this)}).each(function(){menuClasses=[h.menuClass];if(f.op.dropShadows&&!(b.browser.msie&&b.browser.version<7))menuClasses.push(h.shadowClass);b(this).addClass(menuClasses.join(' '))})};var e=b.fn.superfish;e.o=[];e.op={};e.IE7fix=function(){var a=e.op;if(b.browser.msie&&b.browser.version>6&&a.dropShadows&&a.animation.opacity!=undefined)this.toggleClass(e.c.shadowClass+'-off')};e.c={bcClass:'sf-breadcrumb',menuClass:'sf-js-enabled',anchorClass:'sf-with-ul',arrowClass:'sf-sub-indicator',shadowClass:'sf-shadow'};e.defaults={hoverClass:'sfHover',pathClass:'overideThisToUse',pathLevels:1,delay:800,animation:{opacity:'show'},speed:'normal',autoArrows:true,dropShadows:true,disableHI:false,onInit:function(){},onBeforeShow:function(){},onShow:function(){},onHide:function(){}};b.fn.extend({hideSuperfishUl:function(){var a=e.op,d=(a.retainPath===true)?a.$path:'';a.retainPath=false;var c=b(['li.',a.hoverClass].join(''),this).add(this).not(d).removeClass(a.hoverClass).find('>ul').hide().css('visibility','hidden');a.onHide.call(c);return this},showSuperfishUl:function(){var a=e.op,d=e.c.shadowClass+'-off',c=this.addClass(a.hoverClass).find('>ul:hidden').css('visibility','visible');e.IE7fix.call(c);a.onBeforeShow.call(c);c.animate(a.animation,a.speed,function(){e.IE7fix.call(c);a.onShow.call(c)});return this}})})(jQuery);

/* jquery.bgiframe - Version 2.1.1
 * Copyright (c) 2006 Brandon Aaron (http://brandonaaron.net)
 * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) 
 * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
 *
 * $LastChangedDate: 2007-07-21 18:45:56 -0500 (Sat, 21 Jul 2007) $
 * $Rev: 2447 $
 */
;(function($){$.fn.bgIframe=$.fn.bgiframe=function(s){if($.browser.msie&&/$.browser.version < 7/.test(navigator.userAgent)){s=$.extend({top:'auto',left:'auto',width:'auto',height:'auto',opacity:true,src:'javascript:false;'},s||{});var prop=function(n){return n&&n.constructor==Number?n+'px':n;},html='<iframe class="bgiframe"frameborder="0"tabindex="-1"src="'+s.src+'"'+'style="display:block;position:absolute;z-index:-1;'+(s.opacity!==false?'filter:Alpha(Opacity=\'0\');':'')+'top:'+(s.top=='auto'?'expression(((parseInt(this.parentNode.currentStyle.borderTopWidth)||0)*-1)+\'px\')':prop(s.top))+';'+'left:'+(s.left=='auto'?'expression(((parseInt(this.parentNode.currentStyle.borderLeftWidth)||0)*-1)+\'px\')':prop(s.left))+';'+'width:'+(s.width=='auto'?'expression(this.parentNode.offsetWidth+\'px\')':prop(s.width))+';'+'height:'+(s.height=='auto'?'expression(this.parentNode.offsetHeight+\'px\')':prop(s.height))+';'+'"/>';return this.each(function(){if($('> iframe.bgiframe',this).length==0)this.insertBefore(document.createElement(html),this.firstChild);});}return this;};})(jQuery);

/* jquery.purr.js - @version 0.1.0 
 * @author R.A. Ray
 * Copyright (c) 2008 Net Perspective (net-perspective.com)
 * 
 * Modified for Soop Phoenix by Siegert Naber a.k.a. Kokopelli
 */
;(function(e){e.purr=function(b,c){b=e(b);if(!c.isSticky){b.addClass('not-sticky')};if(c.isNewPm){var d=document.getElementById('purr-containerNewPM');if(!d){d='<div id="purr-containerNewPM"></div>'}}else{var d=document.getElementById('purr-container');if(!d){d='<div id="purr-container"></div>'}};d=e(d);if(!c.isNewPm){d.addClass(c.screenPosition)};e('body').append(d);g();function g(){var a=document.createElement('a');e(a).attr({className:'close',href:'#close',title:'Close',innerHTML:'Close'}).appendTo(b).click(function(){f();return false});b.appendTo(d).hide();if(jQuery.browser.msie&&c.usingTransparentPNG){b.show()}else{b.fadeIn(c.fadeInSpeed)}if(!c.isSticky){var h=setInterval(function(){if(b.prevAll('.not-sticky').length==0){clearInterval(h);setTimeout(function(){f()},c.removeTimer)}},200)}}function f(){if(jQuery.browser.msie&&c.usingTransparentPNG){b.css({opacity:0}).animate({height:'0px'},{duration:c.fadeOutSpeed,complete:function(){b.remove()}})}else{b.animate({opacity:'0'},{duration:c.fadeOutSpeed,complete:function(){b.animate({height:'0px'},{duration:c.fadeOutSpeed,complete:function(){b.remove()}})}})}}};e.fn.purr=function(a){a=a||{};a.fadeInSpeed=a.fadeInSpeed||500;a.fadeOutSpeed=a.fadeOutSpeed||500;a.removeTimer=a.removeTimer||4000;a.isSticky=a.isSticky||false;a.usingTransparentPNG=a.usingTransparentPNG||false;a.screenPosition=a.screenPosition||"top-right";a.isNewPm=a.isNewPm||false;this.each(function(){new e.purr(this,a)});return this}})(jQuery);

/* dimScreen overlay by Brandon Goldman
 * http://docs.jquery.com/Plugins/dimScreen
 * 
 * Modified for Soop Phoenix by Siegert Naber a.k.a. Kokopelli
 */
;jQuery.extend({dimScreen:function(speed,opacity,callback){if(jQuery('#__overLay').size()>0)return;if(typeof speed=='function'){callback=speed;speed=null}if(typeof opacity=='function'){callback=opacity;opacity=null}if(speed<1){var placeholder=opacity;opacity=speed;speed=placeholder}if(opacity>=1){var placeholder=speed;speed=opacity;opacity=placeholder}speed=(speed>0)?speed:500;opacity=(opacity>0)?opacity:0.5;return jQuery('<div></div>').attr({id:'__overLay',fade_opacity:opacity,speed:speed}).css({height:$(document).height()+'px',left:'0px',opacity:0,position:'absolute',top:'0px',width:$(document).width()+'px',zIndex:2000}).appendTo(document.body).fadeTo(speed,opacity,callback)},dimScreenStop:function(callback){var x=jQuery('#__overLay');var opacity=x.attr('fade_opacity');var speed=x.attr('speed');x.fadeOut(speed,function(){x.remove();if(typeof callback=='function')callback()})}});

/* akModal
 * Copyright (c) 2006-2007 Mathias Bank (http://www.mathias-bank.de)
 * Version 2.1
 * http://plugins.jquery.com/project/akModal
 * 
 * Thanks to 
 * Hinnerk Ruemenapf - http://hinnerk.ruemenapf.de/ for bug reporting and fixing.
 * Tom Leonard for some improvements
 * 
 * Modified for Soop Phoenix by Siegert Naber a.k.a. Kokopelli
 */
;jQuery.extend({showAkModal:function(navurl,title,box_width,box_height){var options={margin:1,border:1,padding:1,scroll:0};var win_width=$(window).width();var win_height=$(window).height();if($.browser.opera&&$.browser.version>=9.50){win_width=window.innerWidth;win_height=window.innerHeight}if(box_width>Math.round(win_width*0.75)){box_width=Math.round(win_width*0.75)}if(box_height>Math.round(win_height*0.75)){box_height=Math.round(win_height*0.75)}$('body').append('<div id="modal_div" style="width:'+box_width+'px;"><div id="modal_title_bar"><div id="modal_title">'+title+'</div><div id="modal_closeX"></div></div><iframe style="display:none;" name="modalIframe" width="'+box_width+'" scrolling="auto" height="'+(box_height-24)+'" frameborder="0" src="" marginheight="0" marginwidth="0"></iframe></div>');var $modalPos;if($.browser.msie&&parseInt($.browser.version)<7){$modalPos='absolute'}else{$modalPos='fixed'}$('#modal_div').css({position:$modalPos,width:box_width,height:'24px',left:'50%',marginLeft:'-'+Math.round(box_width/2)+'px',top:(Math.round((win_height-box_height)/2))+'px',display:'none'});$.dimScreen(500,0.75,function(){var $modalIframe=$('iframe[name="modalIframe"]');$('#modal_div').fadeIn(500);$($modalIframe).attr({src:navurl});$($modalIframe).load(function(){$('#modal_div').animate({height:box_height},500);$($modalIframe).show();$('#modal_title').html($($modalIframe).contents().find('title').html())})});$('#modal_closeX').click(function(){if($('iframe[name="modalIframe"]').getUrlParam('rst')=='1'){$.akModalHideAndReload()}else{$.akModalRemove()}})},akModalRemove:function(){$('#modal_div').slideUp(500,function(){$("#modal_div").remove();$.dimScreenStop()})},akModalHideAndRedirect:function(redirect_url){$('#modal_div').slideUp(500,function(){$.dimScreenStop();window.location=redirect_url})},akModalHideAndReload:function(){$('#modal_div').slideUp(500,function(){$.dimScreenStop();top.window.location.reload(true)})}});

/*
 * Treeview 1.4 - jQuery plugin to hide and show branches of a tree
 * 
 * http://bassistance.de/jquery-plugins/jquery-plugin-treeview/
 * http://docs.jquery.com/Plugins/Treeview
 *
 * Copyright (c) 2007 Jörn Zaefferer
 *
 * Dual licensed under the MIT and GPL licenses:
 *   http://www.opensource.org/licenses/mit-license.php
 *   http://www.gnu.org/licenses/gpl.html
 *
 * Revision: $Id: jquery.treeview.js 4684 2008-02-07 19:08:06Z joern.zaefferer $
 *
 */;(function($){$.extend($.fn,{swapClass:function(c1,c2){var c1Elements=this.filter('.'+c1);this.filter('.'+c2).removeClass(c2).addClass(c1);c1Elements.removeClass(c1).addClass(c2);return this;},replaceClass:function(c1,c2){return this.filter('.'+c1).removeClass(c1).addClass(c2).end();},hoverClass:function(className){className=className||"hover";return this.hover(function(){$(this).addClass(className);},function(){$(this).removeClass(className);});},heightToggle:function(animated,callback){animated?this.animate({height:"toggle"},animated,callback):this.each(function(){jQuery(this)[jQuery(this).is(":hidden")?"show":"hide"]();if(callback)callback.apply(this,arguments);});},heightHide:function(animated,callback){if(animated){this.animate({height:"hide"},animated,callback);}else{this.hide();if(callback)this.each(callback);}},prepareBranches:function(settings){if(!settings.prerendered){this.filter(":last-child:not(ul)").addClass(CLASSES.last);this.filter((settings.collapsed?"":"."+CLASSES.closed)+":not(."+CLASSES.open+")").find(">ul").hide();}return this.filter(":has(>ul)");},applyClasses:function(settings,toggler){this.filter(":has(>ul):not(:has(>a))").find(">span").click(function(event){toggler.apply($(this).next());}).add($("a",this)).hoverClass();if(!settings.prerendered){this.filter(":has(>ul:hidden)").addClass(CLASSES.expandable).replaceClass(CLASSES.last,CLASSES.lastExpandable);this.not(":has(>ul:hidden)").addClass(CLASSES.collapsable).replaceClass(CLASSES.last,CLASSES.lastCollapsable);this.prepend("<div class=\""+CLASSES.hitarea+"\"/>").find("div."+CLASSES.hitarea).each(function(){var classes="";$.each($(this).parent().attr("class").split(" "),function(){classes+=this+"-hitarea ";});$(this).addClass(classes);});}this.find("div."+CLASSES.hitarea).click(toggler);},treeview:function(settings){settings=$.extend({cookieId:"treeview"},settings);if(settings.add){return this.trigger("add",[settings.add]);}if(settings.toggle){var callback=settings.toggle;settings.toggle=function(){return callback.apply($(this).parent()[0],arguments);};}function treeController(tree,control){function handler(filter){return function(){toggler.apply($("div."+CLASSES.hitarea,tree).filter(function(){return filter?$(this).parent("."+filter).length:true;}));return false;};}$("a:eq(0)",control).click(handler(CLASSES.collapsable));$("a:eq(1)",control).click(handler(CLASSES.expandable));$("a:eq(2)",control).click(handler());}function toggler(){$(this).parent().find(">.hitarea").swapClass(CLASSES.collapsableHitarea,CLASSES.expandableHitarea).swapClass(CLASSES.lastCollapsableHitarea,CLASSES.lastExpandableHitarea).end().swapClass(CLASSES.collapsable,CLASSES.expandable).swapClass(CLASSES.lastCollapsable,CLASSES.lastExpandable).find(">ul").heightToggle(settings.animated,settings.toggle);if(settings.unique){$(this).parent().siblings().find(">.hitarea").replaceClass(CLASSES.collapsableHitarea,CLASSES.expandableHitarea).replaceClass(CLASSES.lastCollapsableHitarea,CLASSES.lastExpandableHitarea).end().replaceClass(CLASSES.collapsable,CLASSES.expandable).replaceClass(CLASSES.lastCollapsable,CLASSES.lastExpandable).find(">ul").heightHide(settings.animated,settings.toggle);}}function serialize(){function binary(arg){return arg?1:0;}var data=[];branches.each(function(i,e){data[i]=$(e).is(":has(>ul:visible)")?1:0;});$.cookie(settings.cookieId,data.join(""));}function deserialize(){var stored=$.cookie(settings.cookieId);if(stored){var data=stored.split("");branches.each(function(i,e){$(e).find(">ul")[parseInt(data[i])?"show":"hide"]();});}}this.addClass("treeview");var branches=this.find("li").prepareBranches(settings);switch(settings.persist){case"cookie":var toggleCallback=settings.toggle;settings.toggle=function(){serialize();if(toggleCallback){toggleCallback.apply(this,arguments);}};deserialize();break;case"location":var current=this.find("a").filter(function(){return this.href.toLowerCase()==location.href.toLowerCase();});if(current.length){current.addClass("selected").parents("ul, li").add(current.next()).show();}break;}branches.applyClasses(settings,toggler);if(settings.control){treeController(this,settings.control);$(settings.control).show();}return this.bind("add",function(event,branches){$(branches).prev().removeClass(CLASSES.last).removeClass(CLASSES.lastCollapsable).removeClass(CLASSES.lastExpandable).find(">.hitarea").removeClass(CLASSES.lastCollapsableHitarea).removeClass(CLASSES.lastExpandableHitarea);$(branches).find("li").andSelf().prepareBranches(settings).applyClasses(settings,toggler);});}});var CLASSES=$.fn.treeview.classes={open:"open",closed:"closed",expandable:"expandable",expandableHitarea:"expandable-hitarea",lastExpandableHitarea:"lastExpandable-hitarea",collapsable:"collapsable",collapsableHitarea:"collapsable-hitarea",lastCollapsableHitarea:"lastCollapsable-hitarea",lastCollapsable:"lastCollapsable",lastExpandable:"lastExpandable",last:"last",hitarea:"hitarea"};$.fn.Treeview=$.fn.treeview;})(jQuery);
/** jQuery Form Plugin
* version: 2.28 (10-MAY-2009)
* @requires jQuery v1.2.2 or later
*
* Examples and documentation at: http://malsup.com/jquery/form/
* Dual licensed under the MIT and GPL licenses:
*   http://www.opensource.org/licenses/mit-license.php
*   http://www.gnu.org/licenses/gpl.html 
*/;(function($){$.fn.ajaxSubmit=function(u){if(!this.length){log('ajaxSubmit: skipping submit process - no element selected');return this}if(typeof u=='function')u={success:u};var v=$.trim(this.attr('action'));if(v){v=(v.match(/^([^#]+)/)||[])[1]}v=v||window.location.href||'';u=$.extend({url:v,type:this.attr('method')||'GET'},u||{});var w={};this.trigger('form-pre-serialize',[this,u,w]);if(w.veto){log('ajaxSubmit: submit vetoed via form-pre-serialize trigger');return this}if(u.beforeSerialize&&u.beforeSerialize(this,u)===false){log('ajaxSubmit: submit aborted via beforeSerialize callback');return this}var a=this.formToArray(u.semantic);if(u.data){u.extraData=u.data;for(var n in u.data){if(u.data[n]instanceof Array){for(var k in u.data[n])a.push({name:n,value:u.data[n][k]})}else a.push({name:n,value:u.data[n]})}}if(u.beforeSubmit&&u.beforeSubmit(a,this,u)===false){log('ajaxSubmit: submit aborted via beforeSubmit callback');return this}this.trigger('form-submit-validate',[a,this,u,w]);if(w.veto){log('ajaxSubmit: submit vetoed via form-submit-validate trigger');return this}var q=$.param(a);if(u.type.toUpperCase()=='GET'){u.url+=(u.url.indexOf('?')>=0?'&':'?')+q;u.data=null}else u.data=q;var x=this,callbacks=[];if(u.resetForm)callbacks.push(function(){x.resetForm()});if(u.clearForm)callbacks.push(function(){x.clearForm()});if(!u.dataType&&u.target){var y=u.success||function(){};callbacks.push(function(a){$(u.target).html(a).each(y,arguments)})}else if(u.success)callbacks.push(u.success);u.success=function(a,b){for(var i=0,max=callbacks.length;i<max;i++)callbacks[i].apply(u,[a,b,x])};var z=$('input:file',this).fieldValue();var A=false;for(var j=0;j<z.length;j++)if(z[j])A=true;var B=false;if(u.iframe||A||B){if(u.closeKeepAlive)$.get(u.closeKeepAlive,fileUpload);else fileUpload()}else $.ajax(u);this.trigger('form-submit-notify',[this,u]);return this;function fileUpload(){var h=x[0];if($(':input[name=submit]',h).length){alert('Error: Form elements must not be named "submit".');return}var i=$.extend({},$.ajaxSettings,u);var s=$.extend(true,{},$.extend(true,{},$.ajaxSettings),i);var j='jqFormIO'+(new Date().getTime());var k=$('<iframe id="'+j+'" name="'+j+'" src="about:blank" />');var l=k[0];k.css({position:'absolute',top:'-1000px',left:'-1000px'});var m={aborted:0,responseText:null,responseXML:null,status:0,statusText:'n/a',getAllResponseHeaders:function(){},getResponseHeader:function(){},setRequestHeader:function(){},abort:function(){this.aborted=1;k.attr('src','about:blank')}};var g=i.global;if(g&&!$.active++)$.event.trigger("ajaxStart");if(g)$.event.trigger("ajaxSend",[m,i]);if(s.beforeSend&&s.beforeSend(m,s)===false){s.global&&$.active--;return}if(m.aborted)return;var o=0;var p=0;var q=h.clk;if(q){var n=q.name;if(n&&!q.disabled){u.extraData=u.extraData||{};u.extraData[n]=q.value;if(q.type=="image"){u.extraData[name+'.x']=h.clk_x;u.extraData[name+'.y']=h.clk_y}}}setTimeout(function(){var t=x.attr('target'),a=x.attr('action');h.setAttribute('target',j);if(h.getAttribute('method')!='POST')h.setAttribute('method','POST');if(h.getAttribute('action')!=i.url)h.setAttribute('action',i.url);if(!u.skipEncodingOverride){x.attr({encoding:'multipart/form-data',enctype:'multipart/form-data'})}if(i.timeout)setTimeout(function(){p=true;cb()},i.timeout);var b=[];try{if(u.extraData)for(var n in u.extraData)b.push($('<input type="hidden" name="'+n+'" value="'+u.extraData[n]+'" />').appendTo(h)[0]);k.appendTo('body');l.attachEvent?l.attachEvent('onload',cb):l.addEventListener('load',cb,false);h.submit()}finally{h.setAttribute('action',a);t?h.setAttribute('target',t):x.removeAttr('target');$(b).remove()}},10);var r=0;function cb(){if(o++)return;l.detachEvent?l.detachEvent('onload',cb):l.removeEventListener('load',cb,false);var c=true;try{if(p)throw'timeout';var d,doc;doc=l.contentWindow?l.contentWindow.document:l.contentDocument?l.contentDocument:l.document;if((doc.body==null||doc.body.innerHTML=='')&&!r){r=1;o--;setTimeout(cb,100);return}m.responseText=doc.body?doc.body.innerHTML:null;m.responseXML=doc.XMLDocument?doc.XMLDocument:doc;m.getResponseHeader=function(a){var b={'content-type':i.dataType};return b[a]};if(i.dataType=='json'||i.dataType=='script'){var f=doc.getElementsByTagName('textarea')[0];m.responseText=f?f.value:m.responseText}else if(i.dataType=='xml'&&!m.responseXML&&m.responseText!=null){m.responseXML=toXml(m.responseText)}d=$.httpData(m,i.dataType)}catch(e){c=false;$.handleError(i,m,'error',e)}if(c){i.success(d,'success');if(g)$.event.trigger("ajaxSuccess",[m,i])}if(g)$.event.trigger("ajaxComplete",[m,i]);if(g&&!--$.active)$.event.trigger("ajaxStop");if(i.complete)i.complete(m,c?'success':'error');setTimeout(function(){k.remove();m.responseXML=null},100)};function toXml(s,a){if(window.ActiveXObject){a=new ActiveXObject('Microsoft.XMLDOM');a.async='false';a.loadXML(s)}else a=(new DOMParser()).parseFromString(s,'text/xml');return(a&&a.documentElement&&a.documentElement.tagName!='parsererror')?a:null}}};$.fn.ajaxForm=function(c){return this.ajaxFormUnbind().bind('submit.form-plugin',function(){$(this).ajaxSubmit(c);return false}).each(function(){$(":submit,input:image",this).bind('click.form-plugin',function(e){var a=this.form;a.clk=this;if(this.type=='image'){if(e.offsetX!=undefined){a.clk_x=e.offsetX;a.clk_y=e.offsetY}else if(typeof $.fn.offset=='function'){var b=$(this).offset();a.clk_x=e.pageX-b.left;a.clk_y=e.pageY-b.top}else{a.clk_x=e.pageX-this.offsetLeft;a.clk_y=e.pageY-this.offsetTop}}setTimeout(function(){a.clk=a.clk_x=a.clk_y=null},10)})})};$.fn.ajaxFormUnbind=function(){this.unbind('submit.form-plugin');return this.each(function(){$(":submit,input:image",this).unbind('click.form-plugin')})};$.fn.formToArray=function(b){var a=[];if(this.length==0)return a;var c=this[0];var d=b?c.getElementsByTagName('*'):c.elements;if(!d)return a;for(var i=0,max=d.length;i<max;i++){var e=d[i];var n=e.name;if(!n)continue;if(b&&c.clk&&e.type=="image"){if(!e.disabled&&c.clk==e){a.push({name:n,value:$(e).val()});a.push({name:n+'.x',value:c.clk_x},{name:n+'.y',value:c.clk_y})}continue}var v=$.fieldValue(e,true);if(v&&v.constructor==Array){for(var j=0,jmax=v.length;j<jmax;j++)a.push({name:n,value:v[j]})}else if(v!==null&&typeof v!='undefined')a.push({name:n,value:v})}if(!b&&c.clk){var f=$(c.clk),input=f[0],n=input.name;if(n&&!input.disabled&&input.type=='image'){a.push({name:n,value:f.val()});a.push({name:n+'.x',value:c.clk_x},{name:n+'.y',value:c.clk_y})}}return a};$.fn.formSerialize=function(a){return $.param(this.formToArray(a))};$.fn.fieldSerialize=function(b){var a=[];this.each(function(){var n=this.name;if(!n)return;var v=$.fieldValue(this,b);if(v&&v.constructor==Array){for(var i=0,max=v.length;i<max;i++)a.push({name:n,value:v[i]})}else if(v!==null&&typeof v!='undefined')a.push({name:this.name,value:v})});return $.param(a)};$.fn.fieldValue=function(a){for(var b=[],i=0,max=this.length;i<max;i++){var c=this[i];var v=$.fieldValue(c,a);if(v===null||typeof v=='undefined'||(v.constructor==Array&&!v.length))continue;v.constructor==Array?$.merge(b,v):b.push(v)}return b};$.fieldValue=function(b,c){var n=b.name,t=b.type,tag=b.tagName.toLowerCase();if(typeof c=='undefined')c=true;if(c&&(!n||b.disabled||t=='reset'||t=='button'||(t=='checkbox'||t=='radio')&&!b.checked||(t=='submit'||t=='image')&&b.form&&b.form.clk!=b||tag=='select'&&b.selectedIndex==-1))return null;if(tag=='select'){var d=b.selectedIndex;if(d<0)return null;var a=[],ops=b.options;var e=(t=='select-one');var f=(e?d+1:ops.length);for(var i=(e?d:0);i<f;i++){var g=ops[i];if(g.selected){var v=g.value;if(!v)v=(g.attributes&&g.attributes['value']&&!(g.attributes['value'].specified))?g.text:g.value;if(e)return v;a.push(v)}}return a}return b.value};$.fn.clearForm=function(){return this.each(function(){$('input,select,textarea',this).clearFields()})};$.fn.clearFields=$.fn.clearInputs=function(){return this.each(function(){var t=this.type,tag=this.tagName.toLowerCase();if(t=='text'||t=='password'||tag=='textarea')this.value='';else if(t=='checkbox'||t=='radio')this.checked=false;else if(tag=='select')this.selectedIndex=-1})};$.fn.resetForm=function(){return this.each(function(){if(typeof this.reset=='function'||(typeof this.reset=='object'&&!this.reset.nodeType))this.reset()})};$.fn.enable=function(b){if(b==undefined)b=true;return this.each(function(){this.disabled=!b})};$.fn.selected=function(b){if(b==undefined)b=true;return this.each(function(){var t=this.type;if(t=='checkbox'||t=='radio')this.checked=b;else if(this.tagName.toLowerCase()=='option'){var a=$(this).parent('select');if(b&&a[0]&&a[0].type=='select-one'){a.find('option').selected(false)}this.selected=b}})};function log(){if($.fn.ajaxSubmit.debug&&window.console&&window.console.log)window.console.log('[jquery.form] '+Array.prototype.join.call(arguments,''))}})(jQuery);
//  flashSound 1.1 - jQuery 1.3.2 plugin by bootleq@gmail.com 2009-02-24
(function($){var tracks={};var enabled=true;nextId=function(){var r=0;while($('#sound_'+r).length){r++;}return'sound_'+r;};template=function(id,swf,url){return'<object sap-type="object" sap="object" id="'+id+'" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/" height="0" width="0">'+'<param name="movie" value="'+swf+'" /><param name="FlashVars" value="url='+url+'" /><param name="allowScriptAccess" value="always" /><param name="loop" value="false" /><param name="quality" value="low" />'+'<embed name="'+id+'" src="'+swf+'" FlashVars="url='+url+'" type="application/x-shockwave-flash" allowScriptAccess="always" quality="low" loop="false" pluginspage="http://www.adobe.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" height="0" width="0" /></object>';};play=function(mono){if(mono&&typeof(this.swf_stop)=='function'){this.swf_stop();}if(enabled&&typeof(this.swf_play)=='function'){this.swf_play();}};stop=function(){if(typeof(this.swf_stop)=='function'){this.swf_stop();}};remove=function(id){$('#'+id).remove();tracks[id]=null;};$.extend({flashSound:function(url){options=$.extend({},$.flashSound.defaults,arguments[1]);if(url.constructor!=String){return;}var id=options.id?options.id:nextId();if(tracks[id]){remove.call(tracks[id].obj);}var obj=document.createElement('div');document.body.appendChild(obj);obj.innerHTML=template(id,options.swf,url);if(navigator.appName.indexOf("Microsoft")!=-1){obj=obj.firstChild;}else{obj=$(obj).find('embed').get(0);}tracks[id]={obj:obj,play:function(mono){play.call(obj,mono);},stop:function(){stop.call(obj);},remove:function(){remove.call(null,id);}};return tracks[id];}});$.flashSound.play=function(id,mono){if(tracks[id])return play.call(tracks[id].obj,mono);};$.flashSound.stop=function(id){if(tracks[id])return stop.call(tracks[id].obj);};$.flashSound.remove=function(id){if(tracks[id])return remove.call(null,id);};$.flashSound.enable=function(){enabled=true;};$.flashSound.disable=function(){enabled=false;for(i in tracks){if(tracks[i]&&tracks[i].stop)tracks[i].stop();}};$.flashSound.toggle=function(){if(enabled){$.flashSound.disable();}else{$.flashSound.enable();}};$.flashSound.defaults={id:null,swf:'flashSound.swf'};})(jQuery);
/*
 ### jQuery XML to JSON Plugin v1.0 - 2008-07-01 ###
 * http://www.fyneworks.com/ - diego@fyneworks.com
 * Dual licensed under the MIT and GPL licenses:
 *   http://www.opensource.org/licenses/mit-license.php
 *   http://www.gnu.org/licenses/gpl.html
 ###
 Website: http://www.fyneworks.com/jquery/xml-to-json/
*/
;if(window.jQuery)(function($){$.extend({xml2json:function(xml,extended){if(!xml)return{};function parseXML(node,simple){if(!node)return null;var txt='',obj=null,att=null;var nt=node.nodeType,nn=jsVar(node.localName||node.nodeName);var nv=node.text||node.nodeValue||'';if(node.childNodes){if(node.childNodes.length>0){$.each(node.childNodes,function(n,cn){var cnt=cn.nodeType,cnn=jsVar(cn.localName||cn.nodeName);var cnv=cn.text||cn.nodeValue||'';if(cnt==8){return;}
else if(cnt==3||cnt==4||!cnn){if(cnv.match(/^\s+$/)){return;};txt+=cnv.replace(/^\s+/,'').replace(/\s+$/,'');}
else{obj=obj||{};if(obj[cnn]){if(!obj[cnn].length)obj[cnn]=myArr(obj[cnn]);obj[cnn][obj[cnn].length]=parseXML(cn,true);obj[cnn].length=obj[cnn].length;}
else{obj[cnn]=parseXML(cn);};};});};};if(node.attributes){if(node.attributes.length>0){att={};obj=obj||{};$.each(node.attributes,function(a,at){var atn=jsVar(at.name),atv=at.value;att[atn]=atv;if(obj[atn]){if(!obj[atn].length)obj[atn]=myArr(obj[atn]);obj[atn][obj[atn].length]=atv;obj[atn].length=obj[atn].length;}
else{obj[atn]=atv;};});};};if(obj){obj=$.extend((txt!=''?new String(txt):{}),obj||{});txt=(obj.text)?(typeof(obj.text)=='object'?obj.text:[obj.text||'']).concat([txt]):txt;if(txt)obj.text=txt;txt='';};var out=obj||txt;if(extended){if(txt)out={};txt=out.text||txt||'';if(txt)out.text=txt;if(!simple)out=myArr(out);};return out;};var jsVar=function(s){return String(s||'').replace(/-/g,"_");};var isNum=function(s){return(typeof s=="number")||String((s&&typeof s=="string")?s:'').test(/^((-)?([0-9]*)((\.{0,1})([0-9]+))?$)/);};var myArr=function(o){if(!o.length)o=[o];o.length=o.length;return o;};if(typeof xml=='string')xml=$.text2xml(xml);if(!xml.nodeType)return;if(xml.nodeType==3||xml.nodeType==4)return xml.nodeValue;var root=(xml.nodeType==9)?xml.documentElement:xml;var out=parseXML(root,true);xml=null;root=null;return out;},text2xml:function(str){var out;try{var xml=($.browser.msie)?new ActiveXObject("Microsoft.XMLDOM"):new DOMParser();xml.async=false;}catch(e){throw new Error("XML Parser could not be instantiated")};try{if($.browser.msie)out=(xml.loadXML(str))?xml:false;else out=xml.parseFromString(str,"text/xml");}catch(e){throw new Error("Error parsing XML string")};return out;}});})(jQuery);
