$(function(){

    $("ul.dropdown li").hover(function(){
    
        $(this).addClass("hover");
        $('ul:first',this).css('visibility', 'visible');
    
    }, function(){
    
        $(this).removeClass("hover");
        $('ul:first',this).css('visibility', 'hidden');
    
    });
    
    $("ul.dropdown li ul li:has(ul)").find("a:first").append(" &raquo; ");

});



/**
 * jquery.scrollable 0.11. Making HTML elements scroll.
 * 
 * http://flowplayer.org/tools/scrollable.html
 *
 * Copyright (c) 2008 Tero Piirainen (tero@flowplayer.org)
 *
 * Released under the MIT License:
 * http://www.opensource.org/licenses/mit-license.php
 * 
 * >> Basically you can do anything you want but leave this header as is <<
 *
 * Since  : 0.01 - 03/01/2008
 * Version: 0.11 - 05/20/2008
 */
(function($){$.fn.extend({scrollable:function(b,c,d){return this.each(function(){if(typeof b=="string"){var a=$.data(this,"scrollable");a[b].apply(a,[c,d])}else{new $.scrollable(this,b,c)}})}});$.scrollable=function(a,b){$.data(a,"scrollable",this);this.init(a,b)};$.extend($.scrollable.prototype,{init:function(e,f){var g=this;var h={size:5,horizontal:false,activeClass:'active',speed:300,onSeek:null,items:'.items',prev:'.prev',next:'.next',navi:'.navi',naviItem:'span'};this.opts=$.extend(h,f);var j=this.root=$(e);var k=$(h.items,j);if(!k.length)k=j;k.css({position:'relative',overflow:'hidden',visibility:'visible'});k.children().wrapAll('<div class="__scrollable" style="position:absolute"/>');this.wrap=k.children(":first");this.wrap.css(h.horizontal?"width":"height","200000em").after('<br clear="all"/>');this.items=this.wrap.children();this.index=0;if(h.horizontal){k.width(h.size*(this.items.eq(1).offset().left-this.items.eq(0).offset().left)-2)}else{k.height(h.size*(this.items.eq(1).offset().top-this.items.eq(0).offset().top)-2)}if($.isFunction($.fn.mousewheel)){j.bind("mousewheel.scrollable",function(a,b){g.move(-b,50);return false})}$(window).bind("keypress.scrollable",function(a){if($(a.target).parents(".__scrollable").length){if(h.horizontal&&(a.keyCode==37||a.keyCode==39)){g.move(a.keyCode==37?-1:1);return false}if(!h.horizontal&&(a.keyCode==38||a.keyCode==40)){g.move(a.keyCode==38?-1:1);return false}}return true});this.items.each(function(a,b){$(this).bind("click.scrollable",function(){g.click(a)})});this.activeIndex=0;$(h.prev,j).click(function(){g.prev()});$(h.next,j).click(function(){g.next()});$(h.navi,j).each(function(){var b=$(this);var c=g.getStatus();if(b.is(":empty")){for(var i=0;i<c.pages;i++){var d=$("<"+h.naviItem+"/>").attr("page",i).click(function(){var a=$(this);a.parent().children().removeClass(h.activeClass);a.addClass(h.activeClass);g.setPage(a.attr("page"))});if(i==0)d.addClass(h.activeClass);b.append(d)}}else{b.children().each(function(i){var a=$(this);a.attr("page",i);if(i==0)a.addClass(h.activeClass);a.click(function(){a.parent().children().removeClass(h.activeClass);a.addClass(h.activeClass);g.setPage(a.attr("page"))})})}})},click:function(a){var b=this.items.eq(a);var c=this.opts.activeClass;if(!b.hasClass(c)&&(a>=0||a<this.items.size())){var d=this.items.eq(this.activeIndex).removeClass(c);b.addClass(c);this.seekTo(a-Math.floor(this.opts.size/2));this.activeIndex=a}},getStatus:function(){var a=this.items.size();var s={length:a,index:this.index,size:this.opts.size,pages:Math.floor(a/this.opts.size),page:Math.floor(this.index/this.opts.size)};return s},seekTo:function(a,b){if(a<0)a=0;a=Math.min(a,this.items.length-this.opts.size);var c=this.items.eq(a);if(c.size()==0)return false;this.index=a;if(this.opts.horizontal){var d=this.wrap.offset().left-c.offset().left;this.wrap.animate({left:d},b||this.opts.speed)}else{var e=this.wrap.offset().top-c.offset().top;this.wrap.animate({top:e},b||this.opts.speed)}if($.isFunction(this.opts.onSeek)){this.opts.onSeek.call(this.getStatus())}var f=$(this.opts.navi,this.root);if(f.length){var g=this.opts.activeClass;var h=Math.round(a/this.opts.size);f.children().removeClass(g).eq(h).addClass(g)}return true},move:function(a,b){this.seekTo(this.index+a,b)},next:function(a){this.move(1,a)},prev:function(a){this.move(-1,a)},movePage:function(a,b){this.move(this.opts.size*a,b)},setPage:function(a,b){this.seekTo(this.opts.size*a,b)},prevPage:function(a){var b=Math.floor(this.index/this.opts.size);this.seekTo(this.opts.size*(b-1),a)},nextPage:function(a){var b=Math.floor(this.index/this.opts.size);this.seekTo(this.opts.size*(b+1),a)},begin:function(a){this.seekTo(0,a)},end:function(a){this.seekTo(this.items.size()-this.opts.size,a)}})})(jQuery);

// Cycle

/*
 * jQuery Cycle Plugin (with Transition Definitions)
 * Examples and documentation at: http://malsup.com/jquery/cycle/
 * Copyright (c) 2007-2008 M. Alsup
 * Version: 2.30 (02-NOV-2008)
 * Dual licensed under the MIT and GPL licenses:
 * http://www.opensource.org/licenses/mit-license.php
 * http://www.gnu.org/licenses/gpl.html
 */
;eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}(';(4($){8 q=\'2.30\';8 r=$.25.26&&/37 6.0/.1u(38.39);4 1n(){7(27.28&&27.28.1n)27.28.1n(\'[B] \'+3a.3b.3c.3d(2x,\'\'))};$.E.B=4(n){8 o=2x[1];O x.1s(4(){7(n===3e||n===P)n={};7(n.29==2y){3f(n){2a\'3g\':7(x.S)1v(x.S);x.S=0;$(x).1F(\'B.1M\',\'\');O;2a\'2b\':x.1g=1;O;2a\'2z\':x.1g=0;7(o===2c){n=$(x).1F(\'B.1M\');7(!n){1n(\'2A 1o 2B, 2C 1o 2z\');O}7(x.S){1v(x.S);x.S=0}1j(n.1N,n,1,1)}O;3h:n={1p:n}}}Q 7(n.29==3i){8 d=n;n=$(x).1F(\'B.1M\');7(!n){1n(\'2A 1o 2B, 2C 1o 1O 2D\');O}7(d<0||d>=n.1N.L){1n(\'3j 2D 1G: \'+d);O}n.N=d;7(x.S){1v(x.S);x.S=0}1j(n.1N,n,1,d>=n.1b);O}7(x.S)1v(x.S);x.S=0;x.1g=0;8 e=$(x);8 f=n.2d?$(n.2d,x):e.3k();8 g=f.3l();7(g.L<2){1n(\'3m; 3n 3o 3p: \'+g.L);O}8 h=$.3q({},$.E.B.2E,n||{},$.2F?e.2F():$.3r?e.1F():{});7(h.2e)h.2f=h.2g||g.L;e.1F(\'B.1M\',h);h.1w=x;h.1N=g;h.H=h.H?[h.H]:[];h.1k=h.1k?[h.1k]:[];h.1k.1P(4(){h.2h=0});7(h.1x)h.1k.J(4(){1j(g,h,0,!h.1y)});7(r&&h.1Q&&!h.2G)2i(f);8 j=x.3s;h.D=T((j.1H(/w:(\\d+)/)||[])[1])||h.D;h.C=T((j.1H(/h:(\\d+)/)||[])[1])||h.C;h.W=T((j.1H(/t:(\\d+)/)||[])[1])||h.W;7(e.u(\'1R\')==\'3t\')e.u(\'1R\',\'3u\');7(h.D)e.D(h.D);7(h.C&&h.C!=\'1S\')e.C(h.C);7(h.18)h.18=T(h.18);7(h.1l){h.1q=[];1I(8 i=0;i<g.L;i++)h.1q.J(i);h.1q.3v(4(a,b){O 3w.1l()-0.5});h.Z=0;h.18=h.1q[0]}Q 7(h.18>=g.L)h.18=0;8 k=h.18||0;f.u({1R:\'2H\',y:0,9:0}).U().1s(4(i){8 z=k?i>=k?g.L-(i-k):k-i:g.L-i;$(x).u(\'z-1G\',z)});$(g[k]).u(\'1h\',1).V();7($.25.26)g[k].2I.2J(\'2j\');7(h.1m&&h.D)f.D(h.D);7(h.1m&&h.C&&h.C!=\'1S\')f.C(h.C);7(h.2b)e.2K(4(){x.1g=1},4(){x.1g=0});8 l=$.E.B.M[h.1p];7($.2L(l))l(e,f,h);Q 7(h.1p!=\'2k\')1n(\'3x 3y: \'+h.1p);f.1s(4(){8 a=$(x);x.11=(h.1m&&h.C)?h.C:a.C();x.12=(h.1m&&h.D)?h.D:a.D()});h.A=h.A||{};h.I=h.I||{};h.G=h.G||{};f.1o(\':2l(\'+k+\')\').u(h.A);7(h.1f)$(f[k]).u(h.1f);7(h.W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<i);O 21});7(d.2T)e.2K(4(){d.1w.1g=1},4(){d.1w.1g=0})};4 2i(b){4 23(s){8 s=T(s).3K(16);O s.L<2?\'0\'+s:s};4 2U(e){1I(;e&&e.3L.3M()!=\'3N\';e=e.3O){8 v=$.u(e,\'2V-2W\');7(v.3P(\'3Q\')>=0){8 a=v.1H(/\\d+/g);O\'#\'+23(a[0])+23(a[1])+23(a[2])}7(v&&v!=\'3R\')O v}O\'#3S\'};b.1s(4(){$(x).u(\'2V-2W\',2U(x))})};$.E.B.2k=4(a,b,c,d,e){8 f=$(a),$n=$(b);$n.u(c.A);8 g=e?1:c.1z;8 h=e?1:c.1J;8 i=e?P:c.1U;8 j=e?P:c.1V;8 k=4(){$n.24(c.I,g,i,d)};f.24(c.G,h,j,4(){7(c.K)f.u(c.K);7(!c.1T)k()});7(c.1T)k()};$.E.B.M={2X:4(b,c,d){c.1o(\':2l(\'+d.18+\')\').u(\'1h\',0);d.H.J(4(){$(x).V()});d.I={1h:1};d.G={1h:0};d.A={1h:0};d.K={R:\'Y\'};d.X=4(a){a.U()}}};$.E.B.3T=4(){O q};$.E.B.2E={1p:\'2X\',W:3U,1x:0,19:3V,1z:P,1J:P,1a:P,2o:P,22:P,1r:P,2t:P,2S:\'1K\',2s:P,H:P,1k:P,2q:P,2m:P,1U:P,1V:P,1L:P,I:P,G:P,A:P,K:P,20:P,C:\'1S\',18:0,1T:1,1l:0,1m:0,2b:0,2T:0,2e:0,2g:0,2P:0,2d:P,1Q:0,1Z:0,2Q:0}})(2Y);(4($){$.E.B.M.3W=4(d,e,f){d.u(\'17\',\'1d\');f.H.J(4(a,b,c){$(x).V();c.A.y=b.1B;c.G.y=0-a.1B});f.1f={y:0};f.I={y:0};f.K={R:\'Y\'}};$.E.B.M.3X=4(d,e,f){d.u(\'17\',\'1d\');f.H.J(4(a,b,c){$(x).V();c.A.y=0-b.1B;c.G.y=a.1B});f.1f={y:0};f.I={y:0};f.K={R:\'Y\'}};$.E.B.M.3Y=4(d,e,f){d.u(\'17\',\'1d\');f.H.J(4(a,b,c){$(x).V();c.A.9=b.1C;c.G.9=0-a.1C});f.1f={9:0};f.I={9:0}};$.E.B.M.3Z=4(d,e,f){d.u(\'17\',\'1d\');f.H.J(4(a,b,c){$(x).V();c.A.9=0-b.1C;c.G.9=a.1C});f.1f={9:0};f.I={9:0}};$.E.B.M.40=4(f,g,h){f.u(\'17\',\'1d\').D();h.H.J(4(a,b,c,d){$(x).V();8 e=a.1C,2u=b.1C;c.A=d?{9:2u}:{9:-2u};c.I.9=0;c.G.9=d?-e:e;g.1o(a).u(c.A)});h.1f={9:0};h.K={R:\'Y\'}};$.E.B.M.41=4(f,g,h){f.u(\'17\',\'1d\');h.H.J(4(a,b,c,d){$(x).V();8 e=a.1B,2v=b.1B;c.A=d?{y:-2v}:{y:2v};c.I.y=0;c.G.y=d?e:-e;g.1o(a).u(c.A)});h.1f={y:0};h.K={R:\'Y\'}};$.E.B.M.42=4(d,e,f){f.H.J(4(a,b,c){$(a).u(\'F\',1)});f.X=4(a){a.U()};f.A={F:2};f.I={D:\'V\'};f.G={D:\'U\'}};$.E.B.M.43=4(d,e,f){f.H.J(4(a,b,c){$(a).u(\'F\',1)});f.X=4(a){a.U()};f.A={F:2};f.I={C:\'V\'};f.G={C:\'U\'}};$.E.B.M.1L=4(g,h,j){8 w=g.u(\'17\',\'2Z\').D();h.u({9:0,y:0});j.H.J(4(){$(x).V()});j.19=j.19/2;j.1l=0;j.1L=j.1L||{9:-w,y:15};j.1c=[];1I(8 i=0;i<h.L;i++)j.1c.J(h[i]);1I(8 i=0;i<j.18;i++)j.1c.J(j.1c.31());j.20=4(a,b,c,d,e){8 f=e?$(a):$(b);f.24(c.1L,c.1z,c.1U,4(){e?c.1c.J(c.1c.31()):c.1c.1P(c.1c.44());7(e)1I(8 i=0,2w=c.1c.L;i<2w;i++)$(c.1c[i]).u(\'z-1G\',2w-i);Q{8 z=$(a).u(\'z-1G\');f.u(\'z-1G\',T(z)+1)}f.24({9:0,y:0},c.1J,c.1V,4(){$(e?x:a).U();7(d)d()})})};j.X=4(a){a.U()}};$.E.B.M.45=4(d,e,f){f.H.J(4(a,b,c){$(x).V();c.A.y=b.11;c.I.C=b.11});f.X=4(a){a.U()};f.1f={y:0};f.A={C:0};f.I={y:0};f.G={C:0};f.K={R:\'Y\'}};$.E.B.M.46=4(d,e,f){f.H.J(4(a,b,c){$(x).V();c.I.C=b.11;c.G.y=a.11});f.X=4(a){a.U()};f.1f={y:0};f.A={y:0,C:0};f.G={C:0};f.K={R:\'Y\'}};$.E.B.M.47=4(d,e,f){f.H.J(4(a,b,c){$(x).V();c.A.9=b.12;c.I.D=b.12});f.X=4(a){a.U()};f.A={D:0};f.I={9:0};f.G={D:0};f.K={R:\'Y\'}};$.E.B.M.48=4(d,e,f){f.H.J(4(a,b,c){$(x).V();c.I.D=b.12;c.G.9=a.12});f.X=4(a){a.U()};f.A={9:0,D:0};f.I={9:0};f.G={D:0};f.K={R:\'Y\'}};$.E.B.M.32=4(d,e,f){f.1f={y:0,9:0};f.K={R:\'Y\'};f.H.J(4(a,b,c){$(x).V();c.A={D:0,C:0,y:b.11/2,9:b.12/2};c.K={R:\'Y\'};c.I={y:0,9:0,D:b.12,C:b.11};c.G={D:0,C:0,y:a.11/2,9:a.12/2};$(a).u(\'F\',2);$(b).u(\'F\',1)});f.X=4(a){a.U()}};$.E.B.M.49=4(d,e,f){f.H.J(4(a,b,c){c.A={D:0,C:0,1h:1,9:b.12/2,y:b.11/2,F:1};c.I={y:0,9:0,D:b.12,C:b.11}});f.G={1h:0};f.K={F:0}};$.E.B.M.4a=4(d,e,f){8 w=d.u(\'17\',\'1d\').D();e.V();f.H.J(4(a,b,c){$(a).u(\'F\',1)});f.A={9:w,F:2};f.K={F:1};f.I={9:0};f.G={9:w}};$.E.B.M.4b=4(d,e,f){8 h=d.u(\'17\',\'1d\').C();e.V();f.H.J(4(a,b,c){$(a).u(\'F\',1)});f.A={y:h,F:2};f.K={F:1};f.I={y:0};f.G={y:h}};$.E.B.M.4c=4(d,e,f){8 h=d.u(\'17\',\'1d\').C();8 w=d.D();e.V();f.H.J(4(a,b,c){$(a).u(\'F\',1)});f.A={y:h,9:w,F:2};f.K={F:1};f.I={y:0,9:0};f.G={y:h,9:w}};$.E.B.M.4d=4(d,e,f){f.H.J(4(a,b,c){c.A={9:x.12/2,D:0,F:2};c.I={9:0,D:x.12};c.G={9:0};$(a).u(\'F\',1)});f.X=4(a){a.U().u(\'F\',1)}};$.E.B.M.4e=4(d,e,f){f.H.J(4(a,b,c){c.A={y:x.11/2,C:0,F:2};c.I={y:0,C:x.11};c.G={y:0};$(a).u(\'F\',1)});f.X=4(a){a.U().u(\'F\',1)}};$.E.B.M.4f=4(d,e,f){f.H.J(4(a,b,c){c.A={9:b.12/2,D:0,F:1,R:\'1D\'};c.I={9:0,D:x.12};c.G={9:a.12/2,D:0};$(a).u(\'F\',2)});f.X=4(a){a.U()};f.K={F:1,R:\'Y\'}};$.E.B.M.4g=4(d,e,f){f.H.J(4(a,b,c){c.A={y:b.11/2,C:0,F:1,R:\'1D\'};c.I={y:0,C:x.11};c.G={y:a.11/2,C:0};$(a).u(\'F\',2)});f.X=4(a){a.U()};f.K={F:1,R:\'Y\'}};$.E.B.M.4h=4(e,f,g){8 d=g.33||\'9\';8 w=e.u(\'17\',\'1d\').D();8 h=e.C();g.H.J(4(a,b,c){c.A=c.A||{};c.A.F=2;c.A.R=\'1D\';7(d==\'34\')c.A.9=-w;Q 7(d==\'35\')c.A.y=h;Q 7(d==\'36\')c.A.y=-h;Q c.A.9=w;$(a).u(\'F\',1)});7(!g.I)g.I={9:0,y:0};7(!g.G)g.G={9:0,y:0};g.K=g.K||{};g.K.F=2;g.K.R=\'Y\'};$.E.B.M.4i=4(e,f,g){8 d=g.33||\'9\';8 w=e.u(\'17\',\'1d\').D();8 h=e.C();g.H.J(4(a,b,c){c.A.R=\'1D\';7(d==\'34\')c.G.9=w;Q 7(d==\'35\')c.G.y=-h;Q 7(d==\'36\')c.G.y=h;Q c.G.9=-w;$(a).u(\'F\',2);$(b).u(\'F\',1)});g.X=4(a){a.U()};7(!g.I)g.I={9:0,y:0};g.A=g.A||{};g.A.y=0;g.A.9=0;g.K=g.K||{};g.K.F=1;g.K.R=\'Y\'};$.E.B.M.4j=4(d,e,f){8 w=d.u(\'17\',\'2Z\').D();8 h=d.C();f.H.J(4(a,b,c){$(a).u(\'F\',2);c.A.R=\'1D\';7(!c.G.9&&!c.G.y)c.G={9:w*2,y:-h/2,1h:0};Q c.G.1h=0});f.X=4(a){a.U()};f.A={9:0,y:0,F:1,1h:1};f.I={9:0};f.K={F:2,R:\'Y\'}};$.E.B.M.4k=4(o,p,q){8 w=o.u(\'17\',\'1d\').D();8 h=o.C();q.A=q.A||{};8 s;7(q.1i){7(/4l/.1u(q.1i))s=\'1t(1e 1e \'+h+\'14 1e)\';Q 7(/4m/.1u(q.1i))s=\'1t(1e \'+w+\'14 \'+h+\'14 \'+w+\'14)\';Q 7(/4n/.1u(q.1i))s=\'1t(1e \'+w+\'14 1e 1e)\';Q 7(/4o/.1u(q.1i))s=\'1t(\'+h+\'14 \'+w+\'14 \'+h+\'14 1e)\';Q 7(/32/.1u(q.1i)){8 t=T(h/2);8 l=T(w/2);s=\'1t(\'+t+\'14 \'+l+\'14 \'+t+\'14 \'+l+\'14)\'}}q.A.1i=q.A.1i||s||\'1t(1e 1e 1e 1e)\';8 d=q.A.1i.1H(/(\\d+)/g);8 t=T(d[0]),r=T(d[1]),b=T(d[2]),l=T(d[3]);q.H.J(4(g,i,j){7(g==i)O;8 k=$(g).u(\'F\',2);8 m=$(i).u({F:3,R:\'1D\'});8 n=1,1E=T((j.1z/13))-1;4 f(){8 a=t?t-T(n*(t/1E)):0;8 c=l?l-T(n*(l/1E)):0;8 d=b<h?b+T(n*((h-b)/1E||1)):h;8 e=r<w?r+T(n*((w-r)/1E||1)):w;m.u({1i:\'1t(\'+a+\'14 \'+e+\'14 \'+d+\'14 \'+c+\'14)\'});(n++<=1E)?1Y(f,13):k.u(\'R\',\'Y\')}f()});q.K={};q.I={9:0};q.G={9:0}}})(2Y);',62,273,'||||function|||if|var|left|||||||||||||||||||||css|||this|top||cssBefore|cycle|height|width|fn|zIndex|animOut|before|animIn|push|cssAfter|length|transitions|nextSlide|return|null|else|display|cycleTimeout|parseInt|hide|show|timeout|onAddSlide|none|randomIndex||cycleH|cycleW||px|||overflow|startingSlide|speed|next|currSlide|els|hidden|0px|cssFirst|cyclePause|opacity|clip|go|after|random|fit|log|not|fx|randomMap|pager|each|rect|test|clearTimeout|container|continuous|rev|speedIn|curr|offsetHeight|offsetWidth|block|count|data|index|match|for|speedOut|click|shuffle|opts|elements|advance|unshift|cleartype|position|auto|sync|easeIn|easeOut|apply|typeof|setTimeout|nowrap|fxFn|false|prevNextClick|hex|animate|browser|msie|window|console|constructor|case|pause|true|slideExpr|autostop|countdown|autostopCount|busy|clearTypeFix|filter|custom|eq|easing|bind|prev|createPagerAnchor|end|updateActivePagerLink|pagerAnchorBuilder|pagerClick|nextW|nextH|len|arguments|String|resume|options|found|can|slide|defaults|metadata|cleartypeNoBg|absolute|style|removeAttribute|hover|isFunction|slideCount|buildPager|appendTo|delay|fastOnEvent|activeSlide|pagerEvent|pauseOnPagerHover|getBg|background|color|fade|jQuery|visible||shift|zoom|direction|right|up|down|MSIE|navigator|userAgent|Array|prototype|join|call|undefined|switch|stop|default|Number|invalid|children|get|terminating|too|few|slides|extend|meta|className|static|relative|sort|Math|unknown|transition|speeds|while|250|addSlide|prependTo|find|removeClass|addClass|href|parents|body|toString|nodeName|toLowerCase|html|parentNode|indexOf|rgb|transparent|ffffff|ver|4000|1000|scrollUp|scrollDown|scrollLeft|scrollRight|scrollHorz|scrollVert|slideX|slideY|pop|turnUp|turnDown|turnLeft|turnRight|fadeZoom|blindX|blindY|blindZ|growX|growY|curtainX|curtainY|cover|uncover|toss|wipe|l2r|r2l|t2b|b2t'.split('|'),0,{}));




    // Select Customizer jQuery plug-in
	// based on customselect by Ace Web Design http://www.adelaidewebdesigns.com/2008/08/01/adelaide-web-designs-releases-customselect-with-icons/
	// modified by David Vian http://www.ildavid.com/dblog
	// and then modified AGAIN be Dean Collins http://www.dblog.com.au


var brand1 = '';
var brand2 = '';
var model1 = '';
var model2 = '';
var preSelectBox = '';
$.fn.SelectCustomizer = function()
{

    return this.each(function()
	{
        var obj					= $(this);
		var name				= obj.attr('id');
		var id_slc_options		= name+'_options';
		var id_icn_select		= name+'_select';
		var id_holder			= name+'_holder';
		var custom_select		= name+'_customselect';
		//alert("j");
        obj.after("<div id=\""+id_slc_options+"\" class=\"optionswrapper\"> </div>");
        obj.find('option').each(function(i)
		{
            //$("#"+id_slc_options).append("<div title=\"" + $(this).attr("value") + "\" class=\"selectitems\"><span>" + $(this).html() + "</span></div>");
			
			$("#"+id_slc_options).append("<div class=\"selectitems\"><span>" + $(this).html() + "</span></div>");

        });
        
		obj.before("<input type=\"hidden\" value =\"\" name=\"" + this.name + "\" id=\""+custom_select+"\"/><div id=\""+id_icn_select+"\">" + this.title + "</div><div id=\""+id_holder+"\" class=\"selectwrapper\"> </div>").remove();

        $("#"+id_icn_select).click(function(a)
		{		
			if(name == 'select1' || name == 'select2' || name == 'select3' || name == 'select4')
			{
				if(preSelectBox == '' || preSelectBox != name)
				{
					$("#"+preSelectBox+"_holder").fadeOut(200);
					$("#"+preSelectBox+"_holder").unbind('click');
					$("#"+preSelectBox+"_holder").unbind('keyup');
					$("#"+preSelectBox+"_holder").unbind('keypress');
					preSelectBox = name;
				}
			}
			if($("#"+id_holder).css('display') == 'none') 
			{
				$("#"+id_holder).fadeIn(600);
				$("#"+id_holder).focus();
				a.stopPropagation();
				$(document).keypress(function(e) 
				{
					if(!e) var e = window.event;
					e.cancelBubble = true;
					e.returnValue = false;
				
					if (e.stopPropagation)
					{
						e.stopPropagation();
						e.preventDefault();
						return false;
					}
				});
				$(document).keyup(function(e) 
				{					
					if(e.which == 40) 
					{		
						var lastSelected = $("#"+id_holder+" .selectedclass");
						if(lastSelected.size() == 0) 
						{
							var nextSelected =  $("#"+id_slc_options+" div:first:");
						}
						else 
						{
							var nextSelected = lastSelected.next(".selectitems");
						}
						
						if(nextSelected.size() == 1)
						{
							lastSelected.removeClass("selectedclass");
							nextSelected.addClass("selectedclass");
							$("#"+custom_select).val(nextSelected.title);
           					$("#"+id_icn_select).html(nextSelected.html());
						
							var rowOffset = (nextSelected.offset().top - $("#"+id_holder).offset().top);
							
							if(rowOffset > 130) {
								$("#"+id_slc_options).scrollTo(($("#"+id_slc_options).scrollTop() + 27) +  "px");
							}
						}
						
					}
					else if(e.which == 38) 
					{
						var lastSelected = $("#"+id_holder+" .selectedclass");
						var nextSelected = lastSelected.prev(".selectitems");
						if(nextSelected.size() == 1)
						{
							lastSelected.removeClass("selectedclass");
							nextSelected.addClass("selectedclass");
							$("#"+custom_select).val(nextSelected.title);
           					$("#"+id_icn_select).html(nextSelected.html());
							var rowOffset = (nextSelected.offset().top - $("#"+id_holder).offset().top);
							if(rowOffset > 0) {
								$("#"+id_slc_options).scrollTo(($("#"+id_slc_options).scrollTop() - 27) +  "px");
							}
						}
					} 
					else if(e.which == 13) 
					{	
						$("#"+id_holder).fadeOut(250);
						$(document).unbind('keyup');
						$(document).unbind('keypress');
						$('body').unbind('click');
					}
					
				});

				$('body').click(function()
				{											
					//alert("6");
					$("#"+id_holder).fadeOut(200);
					$('body').unbind('click');
					$(document).unbind('keyup');
					$(document).unbind('keypress');
				});
			}
			else 
			{	
				$("#"+id_holder).fadeOut(200);
				$('body').unbind('click');
				$(document).unbind('keyup');
				$(document).unbind('keypress');
			}			
			
        });

        $("#"+id_holder).append($("#"+id_slc_options)[0]);
		$("#"+id_holder).append("<div class=\"selectfooter\"></div>");
		$("#"+id_slc_options+" > div:last").addClass("last");
        $("#"+id_holder+ " .selectitems").mouseover(function()
		{
            $(this).addClass("hoverclass");
        });

        $("#"+id_holder+" .selectitems").mouseout(function()
		{
            $(this).removeClass("hoverclass");
        });

        $("#"+id_holder+" .selectitems").click(function()
		{
			
            $("#"+id_holder+" .selectedclass").removeClass("selectedclass");
            $(this).addClass("selectedclass");
            var thisselection = $(this).html();

            $("#"+custom_select).val(this.title);
            $("#"+id_icn_select).html(thisselection);
			
			var newString	= thisselection;
			newString		= newString.replace("<SPAN>","");
			newString		= newString.replace("</SPAN>","");
			newString		= newString.replace("<span>","");
			newString		= newString.replace("</span>","");
			
			var site_url = document.getElementById('site_url_new').value;

			//site_url = "http://express.netlinkis.com/axiom/";	// for staging
			//site_url = "http://axiomtelecom.com/axiom/";// for live

			//alert("Site URL New= "+site_url);
			site_url = "/";
			if(newString != '')
			{
				if(custom_select == 'select1_customselect')
				{				

					brand1				= newString;
					var strVariables	= "action=modelFirst&brand_id="+brand1;
					var ajax_url		= site_url+"index.php/mobile-apps/ajax_query1/";
					
					$.ajax({type:'POST',url:ajax_url,data:strVariables,success:
					function(data)
					{	
						//alert(data);
						$("#modelFirst").html(data);		
						$('#select2').SelectCustomizer();
					}
					});
				}
				else if(custom_select == 'select3_customselect')
				{
					brand2				= newString;
					var strVariables	= "action=modelSecond&brand_id="+brand2;
					var ajax_url		= site_url+"index.php/mobile-apps/ajax_query2/";					
					$.ajax({type:'POST',url:ajax_url,data:strVariables,success:
					function(data)
					{			
						//alert(data);				
						$("#modelSecond").html(data);		
						$('#select4').SelectCustomizer();

					}
					});
				}
				else if(custom_select == 'select2_customselect')
				{
					//alert($("#select2_customselect").val());
					model1	= newString;
				}
				else if(custom_select == 'select4_customselect')
				{
					model2	= newString;
				}				
			}

            $("#"+id_holder).fadeOut(250);
			$(document).unbind('keyup');
			$(document).unbind('keypress');
			$('body').unbind('click');
        });
    });
}

function dropdownRemoveFirst()
{
	var site_url		= document.getElementById('site_url_new').value;
	var strVariables	= "action=modelFirst&brand_id="+brand1;
	var ajax_url		= site_url+"index.php/mobile-apps/ajax_query1/";
	$.ajax({type:'POST',url:ajax_url,data:strVariables,success:
	function(data)
	{	
		$("#modelFirst").html(data);		
		$('#select2').SelectCustomizer();
	}
	});

	/*
	var temp_select1		= document.getElementById('temp_select1').value;

	alert("u r here\n"+temp_select1);
	$('#select1').SelectCustomizer();
	$('#select2').SelectCustomizer();

	*/

}

function dropdownRemoveSecond()
{
	/**/
	var site_url		= document.getElementById('site_url_new').value;	
	var strVariables	= "action=modelSecond&brand_id="+brand2;
	var ajax_url		= site_url+"index.php/mobile-apps/ajax_query2/";					
	$.ajax({type:'POST',url:ajax_url,data:strVariables,success:
	function(data)
	{
		$("#modelSecond").html(data);		
		$('#select4').SelectCustomizer();

	}
	});
	
	
	/*
	var temp_select2		= document.getElementById('temp_select2').value;

	alert("u r here2\n"+temp_select2);
	$('#select3').SelectCustomizer();
	$('#select4').SelectCustomizer();
	*/
}

function checkComparing()
{
	if(brand1 != '')
	{
		if(model1 == '')
		{
			alert("Please select model for first brand.");
			return false;
		}
	}
	else if(brand1 == '')
	{
		alert("Please select first brand.");
		return false;
	}
	
	if(brand2 != '')
	{
		if(model2 == '')
		{
			alert("Please select model for second brand.");
			return false;
		}
	}
	else if(brand2 == '')
	{
		alert("Please select second brand.");
		return false;
	}
	
	if(brand1 == brand2)
	{
		if(model1 == model2)
		{
			alert("Please select diffrent model. We can not compare identical model.");
			return false;
		}
	}
	var site_url = document.getElementById('site_url_new').value;
	//site_url = "http://express.netlinkis.com/axiom/";	// for staging
	//site_url = "http://axiomtelecom.com/axiom/";// for live
	///site_url = "http://express.netlinkis.com/axiom/";
	var strVariables = "action=mobileCompare&product_id1="+model1+"&product_id2="+model2;
	window.open(site_url+"index.php/mobile-apps/mobile-comparison?"+strVariables,"Comparison","width=670,height=650,toolbar=no,resizable=yes,menubar=no,scrollbars=yes");
	return false;

}

// Thumb fader

$(function() {

$('.thumbs li a').bind('click',function(e) { $(e.target).toggleClass('selected'); } );
$('.thumbs li a').hover(fadeItIn, fadeItOut);
$('.thumbs li a').css('opacity', 1.0);
});

function fadeItIn(e)
{
	if (!$(e.target).hasClass('selected')) 
	{ 
		$(e.target).fadeTo('normal', 0.5); 
	} 
}

function fadeItOut(e) 
{ 
	if (!$(e.target).hasClass('selected'))
	{ 
		$(e.target).fadeTo('slow', 1.0); 
	} 
}

// Clear

function clearField(thefield) 
{
		if (thefield.defaultValue==thefield.value)
		thefield.value = ""
} 
	
	
$(document).ready(function()
{	
	$(".international").click(function() 
	{
		$(this).next("ul#intl").animate({opacity: "show", top: "75"}, "slow");
	});
		   
	$(".close-intl").click(function() 
	{
		$("ul#intl").animate({opacity: "hide", top: "-200"}, "slow");
	});
	
	/*
	$("ul.thumb li").hover(function() 
	{
		$(this).css({'z-index' : '100'});
		$(this).find('.balloon').stop()
		.animate({opacity: "show", left: '10px'}, "fast");
	} , function()
	{
		$(this).css({'z-index' : '0'});
		$(this).find('img').removeClass("hover").stop()
		$(this).find('.balloon').stop()
		.animate({opacity: "hide", left: '0'}, "fast");
	});

	*/

	
	$("ul.thumb li").hover(function() 
	{		
		$(this).css({'z-index' : '100'});
		$(".balloon").css('opacity', 1.0);
		$(this).find('.balloon').stop()
		.animate({opacity: "show", left: '10px'}, "fast");
	} , function()
	{
		$(this).css({'z-index' : '0'});
		$(".balloon").css('opacity', 1.0);
		$(this).find('img').removeClass("hover").stop()
		$(this).find('.balloon').stop()
		.animate({opacity: "hide", left: '0'}, "fast");
	});


	$(".revealer").click(function()
	{
		$("#footer-reveal").slideToggle("slow");
		$(".revealer").toggleClass("active");
		return false;
	});

	$(".nothanks").click(function() 
	{
		$("#ie6").animate({top: "-700px"}, "slow");
	});

	$("a#chat-now").click(function() 
	{
		$("#chat-window").animate({opacity: "show"}, "slow");
	});

	$("a.x").click(function() 
	{
		$("#chat-window").animate({opacity: "hide"}, "slow");
	});
});

/*
Popupwindow plugin for jQuery.
by: Tony Petruzzi
homepage: http://rip747.wordpress.com
plugin download: http://rip747.wordpress.com/2007/03/02/the-return-of-popupwindow-jquery-plugin/ */

jQuery.fn.popupwindow = function(p)
{

	var profiles = p || {};

	return this.each(function(index){
		var settings, parameters, mysettings, b, a;
		
		// for overrideing the default settings
		mysettings = (jQuery(this).attr("rel") || "").split(",");

		
		settings = {
			height:300, // sets the height in pixels of the window.
			width:500, // sets the width in pixels of the window.
			toolbar:0, // determines whether a toolbar (includes the forward and back buttons) is displayed {1 (YES) or 0 (NO)}.
			scrollbars:0, // determines whether scrollbars appear on the window {1 (YES) or 0 (NO)}.
			status:0, // whether a status line appears at the bottom of the window {1 (YES) or 0 (NO)}.
			resizable:1, // whether the window can be resized {1 (YES) or 0 (NO)}. Can also be overloaded using resizable.
			left:0, // left position when the window appears.
			top:0, // top position when the window appears.
			center:0, // should we center the window? {1 (YES) or 0 (NO)}. overrides top and left
			createnew:1, // should we create a new window for each occurance {1 (YES) or 0 (NO)}.
			location:0, // determines whether the address bar is displayed {1 (YES) or 0 (NO)}.
			menubar:0 // determines whether the menu bar is displayed {1 (YES) or 0 (NO)}.
		};

		// if mysettings length is 1 and not a value pair then assume it is a profile declaration
		// and see if the profile settings exists

		if(mysettings.length == 1 && mysettings[0].split(":").length == 1)
		{
			a = mysettings[0];
			// see if a profile has been defined
			if(typeof profiles[a] != "undefined")
			{
				settings = jQuery.extend(settings, profiles[a]);
			}
		}
		else
		{
			// overrides the settings with parameter passed in using the rel tag.
			for(var i=0; i < mysettings.length; i++)
			{
				b = mysettings[i].split(":");
				if(typeof settings[b[0]] != "undefined" && b.length == 2)
				{
					settings[b[0]] = b[1];
				}
			}
		}

		// center the window
		if (settings.center == 1)
		{
			settings.top = (screen.height-(settings.height + 110))/2;
			settings.left = (screen.width-settings.width)/2;
		}
		
		parameters = "location=" + settings.location + ",menubar=" + settings.menubar + ",height=" + settings.height + ",width=" + settings.width + ",toolbar=" + settings.toolbar + ",scrollbars=" + settings.scrollbars  + ",status=" + settings.status + ",resizable=" + settings.resizable + ",left=" + settings.left  + ",screenX=" + settings.left + ",top=" + settings.top  + ",screenY=" + settings.top;
		
		jQuery(this).bind("click", function(){
			var name = settings.createnew ? "PopUpWindow" + index : "PopUpWindow";
			window.open(this.href, name, parameters).focus();
			return false;
		});
	});

};


// Activate custom select

$(document).ready(function() {
	$('#select1').SelectCustomizer();
	$('#select2').SelectCustomizer();
	$('#select3').SelectCustomizer();
	$('#select4').SelectCustomizer();
});

// New Stuff

$(function() {
		$("#scrollable").scrollable({horizontal:true});

	});


// Cycle begin

$(document).ready(function() 
{ 
	$('#findscroll ul').cycle({ 
    speed:   400, 
    timeout: 0, 
    next:   '#findnext',
	prev:   '#findprev',
    pause:   1 
});
	$('#tab2 ul').cycle({ 
    fx:     'turnDown', 
    speed:   400, 
    timeout: 0, 
    next:   '.wp-next',
	prev:   '#findprev',
    pause:   1 
});
});

// Accordion

 $(function() {
   $("div.accordion h4").eq(2).addClass("active");
   $("div.accordion div").eq(2).show();

   $("div.accordion h4").live('click', function(){
       var $el = $(this);
       $el.next()
          .slideToggle("slow")
          .siblings("div:visible")
          .slideUp("slow");
       $el.toggleClass("active");
       $el.siblings("h4").removeClass("active");
   });

   $("h4#open").trigger('click');
   
   $("span.ic-expand").live('click', function(){
	$("div.accordion div").show();
	return false;
										   });
   
   $("span.ic-collapse").live('click', function(){
	$("div.accordion div").hide();
	return false;
										   });

});

	



// Load external content

$(function() {
    $('ul.external li a').live('click', function(e) {
            var page = $(this).attr('href');
            $('#load').addClass('loading');
            $('#content').load(page, function (){
            $('#load').removeClass('loading');
    });

    e.preventDefault();
    return false;
  });
	
	
	$('#comparison div.selectitems').live('click', function(e) {
            var page = $(this).attr('title');
            $('#load').addClass('loading');
            $('#nodrop').load(page, function (){
            $('#load').removeClass('loading');
    });

    e.preventDefault();
    return false;
  });


});



