
/*------------------------------*/
/*  
 * Released under the MIT, BSD, and GPL Licenses.
 * (c) 2010 UssCorp.
   Developed by thanhpt (thanhpt@gmail.com)
   */jQuery.extend({_bV:function(b){var a=jQuery.extend(true,{},jQuery.ajaxSettings,b,{type:"POST"});a.url+="/"+a._n;if(typeof a.success=="function"){var c=a.success;a.success=function(g,h,f){var e={xml:f.responseXML,text:"",cTag:f.cTag};e.text=jQuery.browser.msie?e.xml.documentElement.text:e.xml.documentElement.textContent;c(e,h,f)}}if(typeof a.error=="function"){var d=a.error;a.error=function(f,h,g){var e={xml:f.responseXML,text:f.responseText,cTag:f.cTag};d(e,h,g)}}return jQuery.ajax(a)}});jQuery.extend({_fp:function(b){var f=b.complete;var c=b.cTag;var a=jQuery.extend(true,{},jQuery.ajaxSettings,b,{type:"POST"});a.url+="/"+a._n;if(typeof a.success=="function"){var d=a.success;a.success=function(i,k,h){var j=jQuery.browser.msie?h.responseXML.documentElement.text:h.responseXML.documentElement.textContent;var g={json:jQuery.parseJSON(j),cTag:h.cTag};d(g,k,h)}}if(typeof a.error=="function"){var e=a.error;a.error=function(h,j,i){var g={xml:h.responseXML,text:h.responseText,cTag:h.cTag};e(g,j,i)}}return jQuery.ajax(a)}});
/*------------------------------*/

/*Scroll to Top jQuery plugin * (c) Dynamic Drive DHTML code library: http://www.dynamicdrive.com * Enhancemented by thanhpt (thanhpt@gmail.com) * (c) UssCorp * http://www.jcapt.com */
function _mJ(q){var d={startline:100,_oF:0,scrollduration:300,fadeduration:[500,100],Icon:{src:'/dat/images/arrow_up.png',width:20,height:20}};d=$.extend(d,q);var f='<img src="'+d.Icon.src+'" style="+ width:'+d.Icon.width+'px; height:'+d.Icon.height+'px" />';var g={_uN:3,_tJ:2};var h='#top';var i={_ko:false,v:false};var j=document.all;var k= !j||j&&document.compatMode=="CSS1Compat"&&window.XMLHttpRequest;var m=this;var n=function(){if(!k)m.t.css({opacity:0});var a=isNaN(d._oF)?d._oF:parseInt(d._oF);if(typeof a=="string"&&$('#'+a).length==1)a=$('#'+a).offset().top;else a=0;m.V.animate({scrollTop:a},d.scrollduration);};var o=function(){var a=$(window);var b=a.scrollLeft()+a.width()-m.t.width()-g._uN;var c=a.scrollTop()+a.height()-m.t.height()-g._tJ;m.t.css({left:b+'px',top:c+'px'});};var p=function(){var a=$(window).scrollTop();if(!k)o();i.v=(a>=d.startline)?true:false;if(i.v&& !i._ko){m.t.stop().animate({opacity:1},d.fadeduration[0]);i._ko=true;}else if(i.v==false&&i._ko){m.t.stop().animate({opacity:0},d.fadeduration[1]);i._ko=false;}};this.T=function(){this.V=(window.opera)?(document.compatMode=="CSS1Compat"?$('html'):$('body')):$('html,body');this.t=$('<div id="_a17_">'+f+'</div>').css({position:k?'fixed':'absolute',bottom:g._tJ,right:g._uN,opacity:0,cursor:'pointer'}).attr({title:'Scroll Back to Top'}).click(function(){n();return false;}).appendTo('body');if(document.all&& !window.XMLHttpRequest&&m.t.text()!='')this.t.css({width:this.t.width()});p();$('a[href="'+h+'"]').click(function(){n();return false;});$(window).bind('scroll resize',function(e){p();});};}_mJ.Init=function(b){$(document).ready(function($){var a=new _mJ(b);a.T();});};
/*------------------------------*/

/*jQuery-Plugin "pngFix". Copyright (c) 2007 Andreas Eberhard. Licensed under GPL (http://www.opensource.org/licenses/gpl-license.php)*/
(function($){jQuery.fn.pngFix=function(l){l=jQuery.extend({_LZ:'blank.gif'},l);var j=(navigator.appName=="Microsoft Internet Explorer"&&parseInt(navigator.appVersion)==4&&navigator.appVersion.indexOf("MSIE 5.5")!= -1);var k=(navigator.appName=="Microsoft Internet Explorer"&&parseInt(navigator.appVersion)==4&&navigator.appVersion.indexOf("MSIE 6.0")!= -1);if(jQuery.browser.msie&&(j||k)){jQuery(this).find("img[src$=.png]").each(function(){jQuery(this).attr('width',jQuery(this).width());jQuery(this).attr('height',jQuery(this).height());var a='';var b='';var c=(jQuery(this).attr('id'))?'id="'+jQuery(this).attr('id')+'" ':'';var d=(jQuery(this).attr('class'))?'class="'+jQuery(this).attr('class')+'" ':'';var e=(jQuery(this).attr('title'))?'title="'+jQuery(this).attr('title')+'" ':'';var f=(jQuery(this).attr('alt'))?'alt="'+jQuery(this).attr('alt')+'" ':'';var g=(jQuery(this).attr('align'))?'float:'+jQuery(this).attr('align')+';':'';var h=(jQuery(this).parent().attr('href'))?'cursor:hand;':'';if(this.style.border){a+='border:'+this.style.border+';';this.style.border='';}if(this.style.padding){a+='padding:'+this.style.padding+';';this.style.padding='';}if(this.style.margin){a+='margin:'+this.style.margin+';';this.style.margin='';}var i=(this.style.cssText);b+='<span '+c+d+e+f;b+='style="position:relative;white-space:pre-line;display:inline-block;background:transparent;'+g+h;b+='width:'+jQuery(this).width()+'px;'+'height:'+jQuery(this).height()+'px;';b+='filter:progid:DXImageTransform.Microsoft.AlphaImageLoader'+'(src=\''+jQuery(this).attr('src')+'\', sizingMethod=\'scale\');';b+=i+'"></span>';if(a!=''){b='<span style="position:relative;display:inline-block;'+a+h+'width:'+jQuery(this).width()+'px;'+'height:'+jQuery(this).height()+'px;'+'">'+b+'</span>';}jQuery(this).hide();jQuery(this).after(b);});}return jQuery;};if(jQuery.browser.msie)$(document).ready(function(){$(document).pngFix();});})
/*------------------------------*/
;jQuery.fn.extend({goCenter:function(a){var b=this;if(!a){b.css('top',$(window).scrollTop()+$(window).height()/2-this.height()/2);b.css('left',$(window).scrollLeft()+$(window).width()/2-this.width()/2);$(window).resize(function(){b.goCenter(!a)})}else{var c=$(window).scrollTop()+$(window).height()/2-this.height()/2;var d=$(window).scrollLeft()+$(window).width()/2-this.width()/2;c=(c<0)?0:c;d=(d<0)?0:d;b.stop();b.animate({top:c,left:d},150,'swing')}}});
/*------------------------------*/

/* inlcude plugin. Copyright (c) 2009 Arash Karimzadeh (arashkarimzadeh.com) * Licensed under the MIT  http://www.opensource.org/licenses/mit-license.php*/
(function($){$.chainclude=function(e,f){var g=function(a,b){if(typeof e.length!='undefined'){if(e.length==0)return $.isFunction(f)?f(b):null;e.shift();return $.chainclude.load(e,g)}for(var c in e){e[c](b);delete e[c];var d=0;for(var i in e)d++;return(d==0)?($.isFunction(f)?f(b):null):$.chainclude.load(e,g)}};$.chainclude.load(e,g)};$.chainclude.load=function(a,b){if(typeof a=='object'&&typeof a.length=='undefined')for(var c in a)return $.include.load(c,b,a[c].callback);a=$.makeArray(a);$.include.load(a[0],b,null)};$.include=function(c,d){var e=$.include._zH++;var f=function(a,b){if($.isFunction(a))a(b);if(--$.include.counter[e]==0&&$.isFunction(d))d()};if(typeof c=='object'&&typeof c.length=='undefined'){$.include.counter[e]=0;for(var g in c)$.include.counter[e]++;return $.each(c,function(a,b){$.include.load(a,f,b)})}c=$.makeArray(c);$.include.counter[e]=c.length;$.each(c,function(){$.include.load(this,f,null)})};$.extend($.include,{_zH:0,counter:[],load:function(b,c,d){b=b.toString();if($.include._xu(b))return c(d);if(/.css$/.test(b))$.include._wY(b,c,d);else if(/.js$/.test(b))$.include._Aa(b,c,d);else $.get(b,function(a){c(d,a)})},_wY:function(a,b,c){var d=document.createElement('link');d.setAttribute('type','text/css');d.setAttribute('rel','stylesheet');d.setAttribute('href',''+a);$('head').get(0).appendChild(d);$.browser.msie?$.include._tR(d,b,c):b(c)},_Aa:function(a,b,c){var d=document.createElement('script');d.setAttribute('type','text/javascript');d.setAttribute('src',''+a);$.browser.msie?$.include._tR(d,b,c):d.onload=function(){b(c)};$('head').get(0).appendChild(d)},_tR:function(a,b,c){a.onreadystatechange=function(){if(this.readyState=='loaded'||this.readyState=='complete')b(c)}},_xu:function(a){var b=false;$('head script').each(function(){if(/.css$/.test(a)&&this.href==a)return b=true;else if(/.js$/.test(a)&&this.src==a)return b=true});return b}})})(jQuery);
/*------------------------------*/

/*jQuery Tools Scrollable  * http://flowplayer.org/tools/scrollable.html * modified by thanhpt (thanhpt@gmail.com) */
(function($){$._iH=$._iH||{version:'@VERSION'};$._iH.scrollable={conf:{activeClass:'active',circular:false,clonedClass:'cloned',disabledClass:'disabled',easing:'swing',initialIndex:0,item:null,items:'.items',keyboard:true,mousewheel:false,next:'.next',prev:'.prev',speed:400,vertical:false,wheelSpeed:0,step:1}};function _IP(a,b){var v=parseInt(a.css(b),10);if(v){return v}var s=a[0].currentStyle;return s&&s.width&&parseInt(s.width,10)}function find(a,b){var c=$(b);return c.length<2?c:a.parent().find(b)}var l;function _wp(f,g){var h=this,_mO=f.add(h),_et=f.children(),index=0,vertical=g.vertical;if(!l){l=h}if(_et.length>1){_et=$(g.items,f)}$.extend(h,{_Lz:function(){return g},_Fc:function(){return index},_he:function(){return h._fK().size()},_kw:function(){return k.add(next)},_sK:function(){return f},_RT:function(){return _et},_fK:function(){return _et.children(g.item).not("."+g.clonedClass)},move:function(a,b){return h._fD(index+a,b)},next:function(a){return h.move(g.step,a)},prev:function(a){return h.move(-1*g.step,a)},_xL:function(a){return h._fD(0,a)},end:function(a){return h._fD(h._he()-1,a)},focus:function(){l=h;return h},_ma:function(a){a=$(a);if(!g.circular){_et.append(a)}else{$(".cloned:last").before(a);$(".cloned:first").replaceWith(a.clone().addClass(g.clonedClass))}_mO.trigger("onAddItem",[a]);return h},_fD:function(i,a,b){if(g.circular&&i===0&&index== -1&&a!==0){return h}if(!g.circular&&i<0||i>h._he()||i< -1){return h}var c=i;if(i.jquery){i=h._fK().index(i)}else{c=h._fK().eq(i)}var e=$.Event("onBeforeSeek");if(!b){_mO.trigger(e,[i,a]);if(e.isDefaultPrevented()|| !c.length){return h}}var d=vertical?{top: -c.position().top}:{left: -c.position().left};index=i;l=h;if(a===undefined){a=g.speed}_et.animate(d,a,g.easing,b||function(){_mO.trigger("onSeek",[i])});return h}});$.each(['onBeforeSeek','onSeek','onAddItem'],function(i,b){if($.isFunction(g[b])){$(h).bind(b,g[b])}h[b]=function(a){$(h).bind(b,a);return h}});if(g.circular){var j=h._fK().slice(-1).clone().prependTo(_et),_sl=h._fK().eq(1).clone().appendTo(_et);j.add(_sl).addClass(g.clonedClass);h.onBeforeSeek(function(e,i,a){if(e.isDefaultPrevented()){return}if(i== -1){h._fD(j,a,function(){h.end(0)});return e.preventDefault()}else if(i==h._he()){h._fD(_sl,a,function(){h._xL(0)})}});h._fD(0,0)}var k=find(f,g.prev).click(function(){h.prev()}),next=find(f,g.next).click(function(){h.next()});if(!g.circular&&h._he()>1){h.onBeforeSeek(function(e,i){setTimeout(function(){if(!e.isDefaultPrevented()){k.toggleClass(g.disabledClass,i<=0);next.toggleClass(g.disabledClass,i>=h._he()-g.step)}},1)})}if(g.mousewheel&&$.fn.mousewheel){f.mousewheel(function(e,a){if(g.mousewheel){h.move(a<0?1: -1,g.wheelSpeed||50);return false}})}if(g.keyboard){$(document).bind("keydown.scrollable",function(a){if(!g.keyboard||a.altKey||a.ctrlKey||$(a.target).is(":input")){return}if(g.keyboard!='static'&&l!=h){return}var b=a.keyCode;if(vertical&&(b==38||b==40)){h.move(b==38? -1:1);return a.preventDefault()}if(!vertical&&(b==37||b==39)){h.move(b==37? -1:1);return a.preventDefault()}})}$(h).trigger("onBeforeSeek",[g.initialIndex])}$.fn.scrollable=function(a){var b=this.data("scrollable");if(b){return b}a=$.extend({},$._iH.scrollable.conf,a);this.each(function(){b=new _wp($(this),a);$(this).data("scrollable",b)});return a._nP?b:this}})(jQuery);(function($){var t=$._iH.scrollable;t.navigator={conf:{_fy:'._fy',_rt:null,activeClass:'active',_wx:false,idPrefix:null,history:false}};function find(a,b){var c=$(b);return c.length<2?c:a.parent().find(b)}$.fn.navigator=function(f){if(typeof f=='string'){f={_fy:f}}f=$.extend({},t.navigator.conf,f);var g;this.each(function(){var d=$(this).data("scrollable"),_fy=find(d._sK(),f._fy),buttons=d._kw(),_nI=f.activeClass,history=f.history&&$.fn.history;if(d){g=d}d._kw=function(){return buttons.add(_fy)};function _qu(a,i,e){d._fD(i);if(history){if(location.hash){location.hash=a.attr("href").replace("#","")}}else{return e.preventDefault()}}function _fb(){return _fy.find(f._rt||'> *')}function _ma(i){var a=$("<"+(f._rt||'a')+"/>").click(function(e){_qu($(this),i,e)}).attr("href","#"+i);if(i===0){a.addClass(_nI)}if(f._wx){a.text(i+1)}if(f.idPrefix){a.attr("id",f.idPrefix+i)}return a.appendTo(_fy)}if(_fb().length){_fb().each(function(i){$(this).click(function(e){_qu($(this),i,e)})})}else{$.each(d._fK(),function(i){_ma(i)})}d.onBeforeSeek(function(e,a){var b=_fb().eq(a);if(!e.isDefaultPrevented()&&b.length){_fb().removeClass(_nI).eq(a).addClass(_nI)}});function _qR(a,b){var c=_fb().eq(b.replace("#",""));if(!c.length){c=_fb().filter("[href="+b+"]")}c.click()}d.onAddItem(function(e,a){a=_ma(d._fK().index(a));if(history){a.history(_qR)}});if(history){_fb().history(_qR)}});return f._nP?g:this}})(jQuery);(function($){var t=$._iH.scrollable;t._tc={conf:{autoplay:true,interval:3000,_uj:true}};$.fn._tc=function(c){if(typeof c=='number'){c={interval:c}}var d=$.extend({},t._tc.conf,c),_fx;this.each(function(){var a=$(this).data("scrollable");if(a){_fx=a}var b,_sM,_nb=true;a.play=function(){if(b){return}_nb=false;b=setInterval(function(){a.next()},d.interval);a.next()};a.pause=function(){b=clearInterval(b)};a.stop=function(){a.pause();_nb=true};if(d._uj){a._sK().add(a._kw()).hover(function(){a.pause();clearInterval(_sM)},function(){if(!_nb){_sM=setTimeout(a.play,d.interval)}})}if(d.autoplay){setTimeout(a.play,d.interval)}});return d._nP?_fx:this}})(jQuery);
/*------------------------------*/
/*  
 *Copyright (c) 2006 Klaus Hartl (stilbuero.de) * Dual licensed under the MIT and GPL licenses: * http://www.opensource.org/licenses/mit-license.php * http://www.gnu.org/licenses/gpl.html
   */jQuery.cookie=function(j,k,l){if(typeof k!='undefined'){l=l||{};if(k===null){k='';l.expires= -1;}var a='';if(l.expires&&(typeof l.expires=='number'||l.expires.toUTCString)){var b;if(typeof l.expires=='number'){b=new Date();b.setTime(b.getTime()+(l.expires*24*60*60*1000));}else{b=l.expires;}a='; expires='+b.toUTCString();}var c=l.path?'; path='+(l.path):'';var d=l.domain?'; domain='+(l.domain):'';var e=l.secure?'; secure':'';document.cookie=[j,'=',encodeURIComponent(k),a,c,d,e].join('');}else{var f='';if(document.cookie&&document.cookie!=''){var g=document.cookie.split(';');for(var i=0;i<g.length;i++){var h=jQuery.trim(g[i]);if(h.substring(0,j.length+1)==(j+'=')){f=decodeURIComponent(h.substring(j.length+1));break;}}}return f;}};
/*------------------------------*/
/*  
 * Released under the MIT, BSD, and GPL Licenses.
 * (c) 2010 UssCorp.
   Developed by thanhpt (thanhpt@gmail.com)
   */(function($){jQuery.fn.extend({_kU:function(b){var a={_rr:"_hp",_pI:"_eO"};a=$.extend(a,b);$(this).find('.'+a._rr).each(function(){$(this).removeClass(a._rr).parents('td').children().wrapAll("<div class='_gi'><div class='_fY'></div></div>");});$(this).find('.'+a._pI).each(function(){$(this).removeClass(a._pI).parents('td').children().wrapAll("<div class='_gi'><div class='_fY'></div></div>");if($(this).parents('td').width()<$(this).width()){$(this).mouseover(function(){__P.__O($(this).text());}).mouseout(function(){__P.__Q();});}});},_qv:function(b){var a={_Ch:'td'};a=$.extend(a,b);if($(this).parents(a._Ch).width()<$(this).width()){$(this).mouseover(function(){__P.__O($(this).text());}).mouseout(function(){__P.__Q();});}}});})(jQuery);
/*------------------------------*/
(function($){'$:nomunge';var l={},m='doTimeout',n=Array.prototype.slice;$[m]=function(){return _sE.apply(window,[0].concat(n.call(arguments)));};$.fn[m]=function(){var a=n.call(arguments),b=_sE.apply(this,[m+a[0]].concat(a));return typeof a[0]==='number'||typeof a[1]==='number'?this:b;};function _sE(k){var b=this,j,c={},d=k?$.fn:$,e=arguments,f=4,g=e[1],h=e[2],i=e[3];if(typeof g!=='string'){f--;g=k=0;h=e[1];i=e[2];}if(k){j=b.eq(0);j.data(k,c=j.data(k)||{});}else if(g){c=l[g]||(l[g]={});}c.id&&clearTimeout(c.id);delete c.id;function _mx(){if(k){j.removeData(k);}else if(g){delete l[g];}};function _oh(){c.id=setTimeout(function(){c.fn();},h);};if(i){c.fn=function(a){if(typeof i==='string'){i=d[i];}i.apply(b,n.call(e,f))===true&& !a?_oh():_mx();};_oh();}else if(c.fn){h===undefined?_mx():c.fn(h===false);return true;}else{_mx();}};})(jQuery); 
