window.G8=window.G8||{};G8.dbg=function(){if(console&&navigator.userAgent.indexOf("Firefox")!=-1)console.info(arguments);else{var a="";$.each(arguments,function(b,d){a+=d+"\n\n"});alert(a)}};
G8.ax_jqxtnd=function a(){function b(c,j){for(var i in j)c[i]=j[i];return c}function d(c){return $("<div></div>").text(c).html()}function e(c){return $("<div></div>").html(c).text()}function k(c){return d(c).nl2br().space2Nbsp()}function f(c){return e(c.br2nl().nbsp2Space())}function m(c){c=$.makeArray(c);c.shift();return c}function n(c){if(c)return $("html,body").scrollTop(c);else{c=document.documentElement;var j=document.body;return c&&c.scrollTop||j&&j.scrollTop||0}}function p(c){if(c)return $("html,body").scrollLeft(c);
else{c=document.documentElement;var j=document.body;return c&&c.scrollLeft||j&&j.scrollLeft||0}}function q(c){var j=false;j=["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 i=
"348",l="282",g,h,o,u,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");h=c.attr("width");o=c.attr("height");u=c.attr("flashVars")}else{c=$Self("object",r);if(c.length){g=c.attr("data");h=c.attr("width");o=c.attr("height");if(g=="")g=c.find("param[name='movie']").attr("value");u=c.find("param[name='FlashVars']").attr("value")}}h||(h=c.css("width").stripCssUnit());o||(o=c.css("height").stripCssUnit());h||(h=i);
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"){h=c;h=h.stripNl();h.hasStr("http://")||
(h="http://"+h);if(h.hasStr("www.youtube.com"))g=h.replace("www.youtube.com/watch?v=","www.youtube.com/v/");else if(h.hasStr("vimeo.com"))g=h.replace("vimeo.com/","vimeo.com/moogaloop.swf?clip_id=");else if(h.hasStr("video.gmx.net","www.gmx.net"))g=h.replace("www.gmx.net","video.gmx.net").replace("video.gmx.net/watch","video.gmx.net/movie");else if(h.hasStr("video.web.de"))g=h.replace("video.web.de/watch","video.web.de/movie");else if(h.hasStr("www.liveleak.com"))g=h.replace("www.liveleak.com/view?i=",
"www.liveleak.com/e/");else if(h.hasStr("vids.myspace.com")){if(c=h.match(/videoid=[^&]*/)){c=c[0].toString().replace("videoid=","");g="http://mediaservices.myspace.com/services/media/embed.aspx/m="+c}}else if(h.hasStr("www.veoh.com"))if(c=h.match(/\/watch\/\S*/)){c=c[0].toString().replace("/watch/","");g="http://www.veoh.com/static/swf/webplayer/WebPlayer.swf?permalinkId="+c}h=i;o=l}if(g==undefined||g.hasStr(" ")||!g.hasStr("."))return{dataState:false};else{j=g.hasStr(j)?"ok":"notSupported";if(g.hasStr("www.youtube.com")&&
!g.hasStr("fs="))g+="&fs=1";return{dataState:j,url:g,width:h,height:o,flashVars:u,thumbnailSrcs:t}}}function v(c){var j=window.location.search.substring(1);j=j.split("&");var i;$.each(j,function(l,g){l=g.split("=");if(l[0]==c){i=l.length>1?l[1]:"";return false}});return i}function s(c,j,i){if(typeof j!="undefined"){i=i||{};if(j===null){j="";i.expires=-1}var l="";if(i.expires&&(typeof i.expires=="number"||i.expires.toUTCString)){if(typeof i.expires=="number"){l=new Date;l.setTime(l.getTime()+i.expires*
24*60*60*1E3)}else l=i.expires;l="; expires="+l.toUTCString()}var g=i.path?"; path="+i.path:"",h=i.domain?"; domain="+i.domain:"";i=i.secure?"; secure":"";document.cookie=[c,"=",encodeURIComponent(j),l,g,h,i].join("")}else{j=null;if(document.cookie&&document.cookie!=""){i=document.cookie.split(";");for(l=0;l<i.length;l++){g=$.trim(i[l]);if(g.substring(0,c.length+1)==c+"="){j=decodeURIComponent(g.substring(c.length+1));break}}}return j}}return{objectExtend:b,escapeHtml:d,unescapeHtml:e,inputToHtml:k,
htmlToInput:f,arrayCutFirst:m,windowScrollTop:n,windowScrollLeft:p,readEmbedVideo:q,getQueryVal:v,cookie:s}}();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()},tglClass:function(a,b){return b?this.addClass(a):this.removeClass(a)},isChildOf:function(a){var b=false,d=
this[0];$(a).each(function(){if(this==d){b=true;return false}else{$(this).find("*").each(function(){if(this==d){b=true;return false}});if(b)return false}});return b},parentsSelf:function(a){return this.parents(a).add(this.filter(a))},unwrap:function(a){return this.each(function(){$(this).parents(a).eq(0).after(this).remove()})},sleep:function(){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},storeDiv:function(){return this.appendTo("body").css({display:"none"})},removeAni:function(a,b){var d=this;this.slideUp(a,function(){d.remove();b&&b.call()});return d},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)})},stopp:function(){return this.stop(true)},outerHtml:function(){return $($("<div></div>").html(this.clone())).html()},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,d){return this.stopp().hide().css("height",b).slideDown(a,d)},tglSlideUp:function(a,b,d){return this.stopp().show().css("height",b).slideUp(a,
d)},opacity:function(a){return a||a===0?this.css({opacity:a}):this.css("opacity")},cloneAsForm:function(a,b){b=b||{};var d=b.wOff||0,e=b.hOff||0;b=b.color||a.css("color");d+=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()+d,height:a.outerHeight()+e+(this.get(0).tagName=="TEXTAREA"?
15:0)});return this},clonePos:function(a,b){b=b||{};var d=b.xOff||0,e=b.yOff||0;(b=b.windowFixed===undefined?false:b.windowFixed)?this.css({left:a.offset().left-$(window).scrollLeft()+d,top:a.offset().top-$(window).scrollTop()+e}):this.setPosTo(a,["LEFTI",d],["TOPI",e]);return this},left:function(a){if(a==undefined)return this.offset().left;else{this.css({left:a+"px"});return this}},top:function(a){if(a==undefined)return 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,d){var e;this.parent();var k={},f={};f.isWindow=a.get(0)==window;f.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(f.isWindow||f.isDocument){f.left=0;f.top=0;f.height=a.height();f.width=a.width();f.scrollLeft=a.scrollLeft();f.scrollTop=a.scrollTop()}else{f.left=a.left();f.top=a.top();f.height=a.outerHeight();
f.width=a.outerWidth();f.scrollLeft=0;f.scrollTop=0}for(var v=d?2:1,s=1;s<=v;s++){a=s==1?b:d;if(typeof a=="object"){e=a[0];if(a.length==2)if(e=="LEFT"||e=="LEFTI"||e=="RIGHT"||e=="RIGHTI"||e=="CENTERX")m=a[1]-p+f.scrollLeft;else if(e=="TOP"||e=="TOPI"||e=="BOTTOM"||e=="BOTTOMI"||e=="CENTERY")n=a[1]-q+f.scrollTop}else if(typeof a=="string"){e=a;m=-p+f.scrollLeft;n=-q+f.scrollTop}if(this.css("position")=="fixed")m=n=0;if(e=="CENTERX")this.left(f.left+Math.round((f.width-k.width)/2)+m);else if(e=="CENTERY")this.top(f.top+
Math.round((f.height-k.height)/2)+n);else if(e=="LEFT")this.left(f.left-k.width+m);else if(e=="LEFTI")this.left(f.left+m);else if(e=="TOP")this.top(f.top-k.height+n);else if(e=="TOPI")this.top(f.top+n);else if(e=="RIGHT")this.left(f.left+f.width+m);else if(e=="RIGHTI")this.left(f.left+f.width-k.width+m);else if(e=="BOTTOM")this.top(f.top+f.height+n);else e=="BOTTOMI"&&this.top(f.top+f.height-k.height+n)}return this},totalHeight:function(a){if(a==undefined)return this.outerHeight();else{var b=this.intPadding().y,
d=this.intBorder().y;return this.height(a-b-d)}},totalWidth:function(a){if(a==undefined)return this.outerWidth();else{var b=this.intPadding().x,d=this.intBorder().x;return this.width(a-b-d)}},intPadding:function(){var a=this.intCss("padding-left"),b=this.intCss("padding-right"),d=this.intCss("padding-top"),e=this.intCss("padding-bottom");return{x:a+b,y:d+e}},intMargin:function(){var a=this.intCss("margin-left"),b=this.intCss("margin-right"),d=this.intCss("margin-top"),e=this.intCss("margin-bottom");
return{x:a+b,y:d+e}},intBorder:function(){var a=this.intCss("borderLeftWidth"),b=this.intCss("borderRightWidth"),d=this.intCss("borderTopWidth"),e=this.intCss("borderBottomWidth");return{x:a+b,y:d+e}},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 d=b.offWidth||0,e=b.offHeight||0;b=b.margin||false;this.css({width:a.outerWidth(b)+
d+"px",height:a.outerHeight(b)+e+"px"});return this},isInViewport:function(){var a=$(window),b=a.scrollLeft(),d=a.scrollTop(),e=a.height();a=a.width();var k=this.left(),f=k+this.outerWidth(),m=this.top(),n=m+this.outerHeight();k=k<b?-1:k>=b+a?1:0;b=f<b?-1:f>=b+a?1:0;m=m<d?-1:m>=d+e?1:0;d=n<d?-1:n>=d+e?1:0;return{xLeft:k,xRight:b,yTop:m,yBot:d,viewportHeight:e,viewportWidth:a}}});
