/*
 jquery_xtnd: Version 0.9.2
*/
window.G8=window.G8||{};
G8.ax_jqxtnd=function a(){function b(c,d){return $.proxy(d,c)}function e(){if(typeof console!="undefined")console.info(arguments);else{var c="";$.each(arguments,function(d,j){if($.isArray(j)||typeof j=="object")$.each(arguments,function(l,g){c+="  "+l+":"+g+"\n"});else c+=j+"\n\n"})}}function f(){if(typeof console!="undefined")console.warn(arguments);else{var c="ERROR:\n";$.each(arguments,function(d,j){c+=j+"\n\n"})}}function k(){var c=arguments[0],d=arguments[1],j=arguments[2]!=undefined?G8.ax_jqxtnd.arrayCutFirst(G8.ax_jqxtnd.arrayCutFirst(arguments)).join(""):
"",l=d.cl?' class="'+d.cl+'"':"",g=d.id?' id="'+d.id+'"':"",i=d.pos?"position:"+d.pos+";":"";d=d.hid?"display:none;":"";i=i!=""||d!=""?' style="'+i+d+'"':"";return"<"+c+g+l+i+">"+j+"</"+c+">"}function h(){var c="div",d=arguments[0],j=arguments[1]!=undefined?G8.ax_jqxtnd.arrayCutFirst(arguments).join(""):"",l=d.cl?' class="'+d.cl+'"':"",g=d.id?' id="'+d.id+'"':"",i=d.pos?"position:"+d.pos+";":"";d=d.hid?"display:none;":"";i=i!=""||d!=""?' style="'+i+d+'"':"";return"<"+c+g+l+i+">"+j+"</"+c+">"}function m(c,
d){for(var j in d)c[j]=d[j];return c}function n(c){return $("<div></div>").text(c).html()}function p(c){return $("<div></div>").html(c).text()}function q(c){return n(c).nl2br().space2Nbsp()}function u(c){return p(c.br2nl().nbsp2Space())}function s(c){c=$.makeArray(c);c.shift();return c}function w(c,d){if(c==d)return c;return c+parseInt(Math.random()*(d-c+1))}function x(c){if(c)return $("html,body").scrollTop(c);else{c=document.documentElement;var d=document.body;return c&&c.scrollTop||d&&d.scrollTop||
0}}function y(c){if(c)return $("html,body").scrollLeft(c);else{c=document.documentElement;var d=document.body;return c&&c.scrollLeft||d&&d.scrollLeft||0}}function z(c){var d=false;d=["www.youtube.com","www.youtube-nocookie.com","video.gmx.net","www.gmx.net","video.web.de","www.liveleak.com","www.metacafe.com","video.google.com","www.vimeo.com","vimeo.com","vids.myspace.com","mediaservices.myspace.com","www.break.com","embed.break.com","www.veoh.com","www.tudou.com","video.aol.com","www.cbs.com","www.dailymotion.com",
"www.viddler.com","juggling.tv"];var j="348",l="282",g,i,o,v,t=[],r="MarkupObj";if(typeof c=="string")c.hasStr("<")||(r="Url");if(r=="MarkupObj"){r=$(c);c=$Self("embed",r);if(c.length){g=c.attr("src");i=c.attr("width");o=c.attr("height");v=c.attr("flashVars")}else{c=$Self("object",r);if(c.length){g=c.attr("data");i=c.attr("width");o=c.attr("height");if(g=="")g=c.find("param[name='movie']").attr("value");v=c.find("param[name='FlashVars']").attr("value")}}i||(i=c.css("width").stripCssUnit());o||(o=
c.css("height").stripCssUnit());i||(i=j);o||(o=l);if(g){g=g.replace("youtube-nocookie.com","youtube.com");if(g.hasStr("youtube.com")){c=g.hasStr("&")?g.slice(0,g.indexOf("&")).replace("http://www.youtube.com/v/",""):g.slice(0).replace("http://www.youtube.com/v/","");t.push("http://img.youtube.com/vi/"+c+"/1.jpg");t.push("http://img.youtube.com/vi/"+c+"/2.jpg");t.push("http://img.youtube.com/vi/"+c+"/3.jpg");g="http://www.youtube.com/v/"+c+"&fs=1&rel=0&color1=0x464646&color2=0xCDCDCD"}}}else if(r==
"Url"){i=c;i=i.stripNl();i.hasStr("http://")||(i="http://"+i);if(i.hasStr("www.youtube.com"))g=i.replace("www.youtube.com/watch?v=","www.youtube.com/v/");else if(i.hasStr("vimeo.com"))g=i.replace("vimeo.com/","vimeo.com/moogaloop.swf?clip_id=");else if(i.hasStr("video.gmx.net","www.gmx.net"))g=i.replace("www.gmx.net","video.gmx.net").replace("video.gmx.net/watch","video.gmx.net/movie");else if(i.hasStr("video.web.de"))g=i.replace("video.web.de/watch","video.web.de/movie");else if(i.hasStr("www.liveleak.com"))g=
i.replace("www.liveleak.com/view?i=","www.liveleak.com/e/");else if(i.hasStr("vids.myspace.com")){if(c=i.match(/videoid=[^&]*/)){c=c[0].toString().replace("videoid=","");g="http://mediaservices.myspace.com/services/media/embed.aspx/m="+c}}else if(i.hasStr("www.veoh.com"))if(c=i.match(/\/watch\/\S*/)){c=c[0].toString().replace("/watch/","");g="http://www.veoh.com/static/swf/webplayer/WebPlayer.swf?permalinkId="+c}i=j;o=l}if(g==undefined||g.hasStr(" ")||!g.hasStr("."))return{dataState:false};else{d=
g.hasStr(d)?"ok":"notSupported";if(g.hasStr("www.youtube.com")&&!g.hasStr("fs="))g+="&fs=1";return{dataState:d,url:g,width:i,height:o,flashVars:v,thumbnailSrcs:t}}}function A(c){var d=window.location.search.substring(1);d=d.split("&");var j;$.each(d,function(l,g){l=g.split("=");if(l[0]==c){j=l.length>1?l[1]:"";return false}});return j}function B(c,d,j){if(typeof d!="undefined"){j=j||{};if(d===null){d="";j.expires=-1}var l="";if(j.expires&&(typeof j.expires=="number"||j.expires.toUTCString)){if(typeof j.expires==
"number"){l=new Date;l.setTime(l.getTime()+j.expires*24*60*60*1E3)}else l=j.expires;l="; expires="+l.toUTCString()}var g=j.path?"; path="+j.path:"",i=j.domain?"; domain="+j.domain:"";j=j.secure?"; secure":"";document.cookie=[c,"=",encodeURIComponent(d),l,g,i,j].join("")}else{d=null;if(document.cookie&&document.cookie!=""){j=document.cookie.split(";");for(l=0;l<j.length;l++){g=$.trim(j[l]);if(g.substring(0,c.length+1)==c+"="){d=decodeURIComponent(g.substring(c.length+1));break}}}return d}}return{prxy:b,
makeDom:k,makeDiv:h,dbg:e,err:f,objectExtend:m,escapeHtml:n,unescapeHtml:p,inputToHtml:q,htmlToInput:u,arrayCutFirst:s,getRange:w,windowScrollTop:x,windowScrollLeft:y,readEmbedVideo:z,getQueryVal:A,cookie:B}}();function $Self(a,b){return b.find(a).add(b.filter(a))}
G8.ax_jqxtnd.objectExtend(String.prototype,{stripScripts:function(){return this.replace(new RegExp("<s*script[^>]*>([\\S\\s]*?)</s*script[^>]*>","img"),"")},stripTags:function(){return this.replace(/<\/?[^>]+>/gi,"")},truncate:function(a,b){a=a||30;b=b===undefined?"...":b;return this.length>a?this.slice(0,a-b.length)+b:String(this)},nl2br:function(){return this.replace(/(\r\n)|(\n\r)|\r|\n/g,"<br />").replace(/<br \/><br \/>/g,"<br />&nbsp;<br />")},stripNl:function(){return this.replace(/(\r\n)|(\n\r)|\r|\n/g,
"")},stripCssUnit:function(){return parseInt(this)},br2nl:function(){return this.replace(/<br \/>/g,"\n").replace(/<br\/>/g,"\n").replace(/<br>/g,"\n")},space2Nbsp:function(){return this.replace(/  /g,"&nbsp;&nbsp;")},nbsp2Space:function(){return this.replace(/&nbsp;/g," ").replace(/&#160;/g," ")},hasStr:function(){for(var a=$.isArray(arguments[0])?arguments[0]:arguments,b=0;b<a.length;b++)if(this.toLowerCase().indexOf(a[b].toLowerCase())!=-1)return true;return false}});
jQuery.fn.extend({fadeInXB:function(a,b){return $.browser.msie?this.show(0,b):this.fadeIn(a,b)},fadeOutXB:function(a,b){return $.browser.msie?this.hide(0,b):this.fadeOut(a,b)},tglFadeInXB:function(a,b){return $.browser.msie?this.show(0,b):this.tglFadeIn(a,b)},tglFadeOutXB:function(a,b){return $.browser.msie?this.hide(0,b):this.tglFadeOut(a,b)},tgl:function(a){return a?this.show():this.hide()},tglFadeIn:function(a,b){return this.stopp().hide().opacity(1).fadeIn(a,b)},tglFadeOut:function(a,b){return this.is(":visible")?
this.stopp().show().opacity(1).fadeOut(a,b):this.hide()},tglSlideDown:function(a,b,e){return this.stopp().hide().css("height",b).slideDown(a,e)},tglSlideUp:function(a,b,e){return this.stopp().show().css("height",b).slideUp(a,e)},opacity:function(a){return a||a===0?this.css({opacity:a}):this.css("opacity")},stopp:function(){return this.stop(true)},removeAni:function(a,b){var e=this;this.slideUp(a,function(){e.remove();b&&b()});return e},inpReadVal:function(){return $.trim(this.val())},tglClass:function(a,
b){return b?this.addClass(a):this.removeClass(a)},isChildOf:function(a){var b=false,e=this[0];$(a).each(function(){if(this==e){b=true;return false}else{$(this).find("*").each(function(){if(this==e){b=true;return false}});if(b)return false}});return b},isOrIsChildOf:function(a){var b=false,e=this[0];a.each(function(){var f=this;if($.contains(f,e)||f==e){b=true;return false}});return b},parentsSelf:function(a){return this.parents(a).add(this.filter(a))},outerHtml:function(){return $($("<div></div>").html(this.clone())).html()},
cloneAsForm:function(a,b){b=b||{};var e=b.wOff||0,f=b.hOff||0;b=b.color||a.css("color");e+=6;this.clonePos(a).css({border:0,fontSize:a.css("fontSize"),color:b,backgroundColor:"transparent",fontWeight:a.css("font-weight"),fontFamily:a.css("font-family"),textAlign:a.css("text-align"),lineHeight:a.css("line-height"),fontStyle:a.css("font-style"),width:a.outerWidth()+e,height:a.outerHeight()+f+(this.get(0).tagName=="TEXTAREA"?15:0)});return this},getIdFromClass:function(a){var b="";this.attr("class")&&
$.each(this.attr("class").split(/\s+/),function(){if(this.hasStr(a))b=this.replace(a,"")});return b},bindProxy:function(a,b,e,f){a=a;var k=!$.isFunction(b)?b:false;b=k?e:b;e=k?f:e;k?this.bind(a,k,$.proxy(b,e)):this.bind(a,$.proxy(b,e));return this},storeDiv:function(){return this.appendTo("body").css({display:"none"})},switchClassF:function(a,b){this.filter("."+a).removeClass(a).addClass(b);return this},switchSrc:function(a,b){return this.attr("src",function(){return this.src.replace(a,b)})},srcF:function(a){return a!=
undefined?this.attr("src",a):this.attr("src")},switchHref:function(a,b){if(typeof a=="string")a=new RegExp(a);return this.attr("href",function(){return this.href.replace(a,b)})},clonePos:function(a,b){b=b||{};var e=b.xOff||0,f=b.yOff||0;(b=b.windowFixed===undefined?false:b.windowFixed)?this.css({left:a.offset().left-$(window).scrollLeft()+e,top:a.offset().top-$(window).scrollTop()+f}):this.setPosTo(a,["LEFTI",e],["TOPI",f]);return this},left:function(a){if(a==undefined)return this[0]==$("window")[0]?
0:this.offset().left;else{this.css({left:a+"px"});return this}},top:function(a){if(a==undefined)return this[0]==$("window")[0]?0:this.offset().top;else{this.css({top:a+"px"});return this}},moveLeft:function(a){return this.css({left:this.left()+a})},moveTop:function(a){return this.css({top:this.top()+a})},setPosTo:function(a,b,e){var f;this.parent();var k={},h={};h.isWindow=a.get(0)==window;h.isDocument=a.get(0)==document;k.height=this.outerHeight();k.width=this.outerWidth();k.origOpacity=this.css("opacity");
k.origDisplay=this.css("display");if(k.origDisplay=="none")$.browser.msie?this.css({display:"block"}):this.css({opacity:0,display:"block"});var m=0,n=0;this.css("left")=="auto"&&this.css("left","0px");this.css("top")=="auto"&&this.css("top","0px");var p=isNaN(parseFloat(this.css("left")))?0:parseFloat(this.css("left")),q=isNaN(parseFloat(this.css("top")))?0:parseFloat(this.css("top"));p=this.left()-p;q=this.top()-q;if(k.origDisplay=="none")$.browser.msie?this.css({display:k.origDisplay}):this.css({opacity:k.origOpacity,
display:k.origDisplay});if(h.isWindow||h.isDocument){h.left=0;h.top=0;h.height=a.height();h.width=a.width();h.scrollLeft=a.scrollLeft();h.scrollTop=a.scrollTop()}else{h.left=a.left();h.top=a.top();h.height=a.outerHeight();h.width=a.outerWidth();h.scrollLeft=0;h.scrollTop=0}for(var u=e?2:1,s=1;s<=u;s++){a=s==1?b:e;if(typeof a=="object"){f=a[0];if(a.length==2)if(f=="LEFT"||f=="LEFTI"||f=="RIGHT"||f=="RIGHTI"||f=="CENTERX")m=a[1]-p+h.scrollLeft;else if(f=="TOP"||f=="TOPI"||f=="BOTTOM"||f=="BOTTOMI"||
f=="CENTERY")n=a[1]-q+h.scrollTop}else if(typeof a=="string"){f=a;m=-p+h.scrollLeft;n=-q+h.scrollTop}if(this.css("position")=="fixed")m=n=0;if(f=="CENTERX")this.left(h.left+Math.round((h.width-k.width)/2)+m);else if(f=="CENTERY")this.top(h.top+Math.round((h.height-k.height)/2)+n);else if(f=="LEFT")this.left(h.left-k.width+m);else if(f=="LEFTI")this.left(h.left+m);else if(f=="TOP")this.top(h.top-k.height+n);else if(f=="TOPI")this.top(h.top+n);else if(f=="RIGHT")this.left(h.left+h.width+m);else if(f==
"RIGHTI")this.left(h.left+h.width-k.width+m);else if(f=="BOTTOM")this.top(h.top+h.height+n);else f=="BOTTOMI"&&this.top(h.top+h.height-k.height+n)}return this},totalHeight:function(a){if(a==undefined)return this.outerHeight();else{var b=this.intPadding().y,e=this.intBorder().y;return this.height(a-b-e)}},totalWidth:function(a){if(a==undefined)return this.outerWidth();else{var b=this.intPadding().x,e=this.intBorder().x;return this.width(a-b-e)}},intPadding:function(){var a=this.intCss("padding-left"),
b=this.intCss("padding-right"),e=this.intCss("padding-top"),f=this.intCss("padding-bottom");return{x:a+b,y:e+f}},intMargin:function(){var a=this.intCss("margin-left"),b=this.intCss("margin-right"),e=this.intCss("margin-top"),f=this.intCss("margin-bottom");return{x:a+b,y:e+f}},intBorder:function(){var a=this.intCss("borderLeftWidth"),b=this.intCss("borderRightWidth"),e=this.intCss("borderTopWidth"),f=this.intCss("borderBottomWidth");return{x:a+b,y:e+f}},intCss:function(a){return parseInt(this.css(a))},
cloneWidth:function(a,b){b=b||0;return this.totalWidth(a.outerWidth()+b)},cloneHeight:function(a,b){b=b||0;return this.totalHeight(a.outerHeight()+b)},cloneDim:function(a,b){b=b||{};var e=b.offWidth||0,f=b.offHeight||0;b=b.margin||false;this.css({width:a.outerWidth(b)+e+"px",height:a.outerHeight(b)+f+"px"});return this},isInViewport:function(){var a=$(window),b=a.scrollLeft(),e=a.scrollTop(),f=a.height();a=a.width();var k=this.left(),h=k+this.outerWidth(),m=this.top(),n=m+this.outerHeight();k=k<b?
-1:k>=b+a?1:0;b=h<b?-1:h>=b+a?1:0;m=m<e?-1:m>=e+f?1:0;e=n<e?-1:n>=e+f?1:0;return{xLeft:k,xRight:b,yTop:m,yBot:e,viewportHeight:f,viewportWidth:a}}});
