/*
 * jQuery Tooltip plugin 1.3
 *
 * http://bassistance.de/jquery-plugins/jquery-plugin-tooltip/
 * http://docs.jquery.com/Plugins/Tooltip
 *
 * Copyright (c) 2006 - 2008 J̦rn Zaefferer
 *
 * $Id: jquery.tooltip.js 5741 2008-06-21 15:22:16Z joern.zaefferer $
 * 
 * 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
}(';(8($){j e={},9,m,B,A=$.2u.2g&&/29\\s(5\\.5|6\\.)/.1M(1H.2t),M=12;$.k={w:12,1h:{Z:25,r:12,1d:19,X:"",G:15,E:15,16:"k"},2s:8(){$.k.w=!$.k.w}};$.N.1v({k:8(a){a=$.1v({},$.k.1h,a);1q(a);g 2.F(8(){$.1j(2,"k",a);2.11=e.3.n("1g");2.13=2.m;$(2).24("m");2.22=""}).21(1e).1U(q).1S(q)},H:A?8(){g 2.F(8(){j b=$(2).n(\'Y\');4(b.1J(/^o\\(["\']?(.*\\.1I)["\']?\\)$/i)){b=1F.$1;$(2).n({\'Y\':\'1D\',\'1B\':"2r:2q.2m.2l(2j=19, 2i=2h, 1p=\'"+b+"\')"}).F(8(){j a=$(2).n(\'1o\');4(a!=\'2f\'&&a!=\'1u\')$(2).n(\'1o\',\'1u\')})}})}:8(){g 2},1l:A?8(){g 2.F(8(){$(2).n({\'1B\':\'\',Y:\'\'})})}:8(){g 2},1x:8(){g 2.F(8(){$(2)[$(2).D()?"l":"q"]()})},o:8(){g 2.1k(\'28\')||2.1k(\'1p\')}});8 1q(a){4(e.3)g;e.3=$(\'<t 16="\'+a.16+\'"><10></10><t 1i="f"></t><t 1i="o"></t></t>\').27(K.f).q();4($.N.L)e.3.L();e.m=$(\'10\',e.3);e.f=$(\'t.f\',e.3);e.o=$(\'t.o\',e.3)}8 7(a){g $.1j(a,"k")}8 1f(a){4(7(2).Z)B=26(l,7(2).Z);p l();M=!!7(2).M;$(K.f).23(\'W\',u);u(a)}8 1e(){4($.k.w||2==9||(!2.13&&!7(2).U))g;9=2;m=2.13;4(7(2).U){e.m.q();j a=7(2).U.1Z(2);4(a.1Y||a.1V){e.f.1c().T(a)}p{e.f.D(a)}e.f.l()}p 4(7(2).18){j b=m.1T(7(2).18);e.m.D(b.1R()).l();e.f.1c();1Q(j i=0,R;(R=b[i]);i++){4(i>0)e.f.T("<1P/>");e.f.T(R)}e.f.1x()}p{e.m.D(m).l();e.f.q()}4(7(2).1d&&$(2).o())e.o.D($(2).o().1O(\'1N://\',\'\')).l();p e.o.q();e.3.P(7(2).X);4(7(2).H)e.3.H();1f.1L(2,1K)}8 l(){B=S;4((!A||!$.N.L)&&7(9).r){4(e.3.I(":17"))e.3.Q().l().O(7(9).r,9.11);p e.3.I(\':1a\')?e.3.O(7(9).r,9.11):e.3.1G(7(9).r)}p{e.3.l()}u()}8 u(c){4($.k.w)g;4(c&&c.1W.1X=="1E"){g}4(!M&&e.3.I(":1a")){$(K.f).1b(\'W\',u)}4(9==S){$(K.f).1b(\'W\',u);g}e.3.V("z-14").V("z-1A");j b=e.3[0].1z;j a=e.3[0].1y;4(c){b=c.2o+7(9).E;a=c.2n+7(9).G;j d=\'1w\';4(7(9).2k){d=$(C).1r()-b;b=\'1w\'}e.3.n({E:b,14:d,G:a})}j v=z(),h=e.3[0];4(v.x+v.1s<h.1z+h.1n){b-=h.1n+20+7(9).E;e.3.n({E:b+\'1C\'}).P("z-14")}4(v.y+v.1t<h.1y+h.1m){a-=h.1m+20+7(9).G;e.3.n({G:a+\'1C\'}).P("z-1A")}}8 z(){g{x:$(C).2e(),y:$(C).2d(),1s:$(C).1r(),1t:$(C).2p()}}8 q(a){4($.k.w)g;4(B)2c(B);9=S;j b=7(2);8 J(){e.3.V(b.X).q().n("1g","")}4((!A||!$.N.L)&&b.r){4(e.3.I(\':17\'))e.3.Q().O(b.r,0,J);p e.3.Q().2b(b.r,J)}p J();4(7(2).H)e.3.1l()}})(2a);',62,155,'||this|parent|if|||settings|function|current||||||body|return|||var|tooltip|show|title|css|url|else|hide|fade||div|update||blocked|||viewport|IE|tID|window|html|left|each|top|fixPNG|is|complete|document|bgiframe|track|fn|fadeTo|addClass|stop|part|null|append|bodyHandler|removeClass|mousemove|extraClass|backgroundImage|delay|h3|tOpacity|false|tooltipText|right||id|animated|showBody|true|visible|unbind|empty|showURL|save|handle|opacity|defaults|class|data|attr|unfixPNG|offsetHeight|offsetWidth|position|src|createHelper|width|cx|cy|relative|extend|auto|hideWhenEmpty|offsetTop|offsetLeft|bottom|filter|px|none|OPTION|RegExp|fadeIn|navigator|png|match|arguments|apply|test|http|replace|br|for|shift|click|split|mouseout|jquery|target|tagName|nodeType|call||mouseover|alt|bind|removeAttr|200|setTimeout|appendTo|href|MSIE|jQuery|fadeOut|clearTimeout|scrollTop|scrollLeft|absolute|msie|crop|sizingMethod|enabled|positionLeft|AlphaImageLoader|Microsoft|pageY|pageX|height|DXImageTransform|progid|block|userAgent|browser'.split('|'),0,{}));

/* Elastic textarea */

(function(jQuery){
    jQuery.fn.extend({
        elastic:function(){
            var mimics=['paddingTop','paddingRight','paddingBottom','paddingLeft','fontSize','lineHeight','fontFamily','width','fontWeight'];
            return this.each(function(){
                if(this.type!='textarea'){
                    return false;
                }
                var $textarea=jQuery(this),$twin=jQuery('<div />').css({
                    'position':'absolute',
                    'display':'none',
                    'word-wrap':'break-word'
                }),lineHeight=parseInt($textarea.css('line-height'),10)||parseInt($textarea.css('font-size'),'10'),minheight=parseInt($textarea.css('height'),10)||lineHeight*3,maxheight=parseInt($textarea.css('max-height'),10)||Number.MAX_VALUE,goalheight=0,i=0;
                if(maxheight<0){
                    maxheight=Number.MAX_VALUE;
                }
                $twin.appendTo($textarea.parent());
                var i=mimics.length;
                while(i--){
                    $twin.css(mimics[i].toString(),$textarea.css(mimics[i].toString()));
                }
                function setHeightAndOverflow(height,overflow){
                    curratedHeight=Math.floor(parseInt(height,10));
                    if($textarea.height()!=curratedHeight){
                        $textarea.css({
                            'height':curratedHeight+'px',
                            'overflow':overflow
                        });
                    }
                }
                function update(){
                    var textareaContent=$textarea.val().replace(/&/g,'&amp;').replace(/  /g,'&nbsp;').replace(/<|>/g,'&gt;').replace(/\n/g,'<br />');
                    var twinContent=$twin.html();
                    if(textareaContent+'&nbsp;'!=twinContent){
                        $twin.html(textareaContent+'&nbsp;');
                        if(Math.abs($twin.height()+lineHeight-$textarea.height())>3){
                            var goalheight=$twin.height()+lineHeight;
                            if(goalheight>=maxheight){
                                setHeightAndOverflow(maxheight,'auto');
                            }else if(goalheight<=minheight){
                                setHeightAndOverflow(minheight,'hidden');
                            }else{
                                setHeightAndOverflow(goalheight,'hidden');
                            }
                        }
                    }
                }
                $textarea.css({
                    'overflow':'hidden'
                });
                $textarea.keyup(function(){
                    update();
                });
                $textarea.live('input paste',function(e){
                    setTimeout(update,250);
                });
                update();
            });
        }
    });
})(jQuery);

/* Shuffle */

shuffle = function(o){ //v1.0
    for(var j, x, i = o.length; i; j = parseInt(Math.random() * i), x = o[--i], o[i] = o[j], o[j] = x);
    return o;
};

    jQuery(document).ready(function($) {
		
        /* Popup functions START */
		
        $.fn.hidePopup = function() {
            return $(this).animate({
                top: '-=' + distance + 'px',
                opacity: 0
            }, time, 'swing', function () {
                shown = false;
                $(this).css({
                    'z-index': -99
                }).removeClass('popupAbove popupBelow')
            });
        };
		
        $.fn.showPopup = function(e) {
            id = $(this).attr('id');
			
            var $popup = $('table#'+id+'_popup');
            var linkX = $(this).offset().left;
            var linkY = $(this).offset().top;
            var linkWidth = $(this).width();
            var linkHeight = $(this).height();
            var popupWidth = $popup.width();
            var popupHeight = $popup.height();
            var scrollY = $(document).scrollTop();
            var x = e.pageX;
            var y = e.pageY;
            var $linkSection = $('#reportContent');
            var sectionOffsetX = $linkSection.offset().left;
            var sectionOffsetY = $linkSection.offset().top;
            var popupOffsetX;
            var popupOffsetY;
            var popupPosClass;
			
            // Above
            // popupOffsetX = x - sectionOffsetX - popupWidth/2;
            // popupOffsetY = y - sectionOffsetY - popupHeight - linkHeight;
		
            // Below
            // popupOffsetX = x - sectionOffsetX - popupWidth/2;
            // popupOffsetY = y - sectionOffsetY + linkHeight*2;
			
            if ((y-popupHeight-linkHeight*2) < scrollY) {
                // Below
                popupOffsetX = x - sectionOffsetX - popupWidth/2;
                popupOffsetY = y - sectionOffsetY + linkHeight/2;
                popupPosClass = 'popupBelow';
            } else {
                // Above
                popupOffsetX = x - sectionOffsetX - popupWidth/2;
                popupOffsetY = y - sectionOffsetY - popupHeight - linkHeight/2;
                popupPosClass = 'popupAbove';
            }
			
            $popup.css({
                top: popupOffsetY,
                left: popupOffsetX,
                'z-index': 50
            }).animate({
                top: '-=' + distance,
                opacity: 1
            }, time, 'swing', function() {
                beingShown = false;
                shown = true;
            }).mouseover(function(){
                if (hideDelayTimer) clearTimeout(hideDelayTimer);
                shown = true;
            }).mouseout(function(){
                delayHidePopup(id);
            }).addClass(popupPosClass);
			
            return $(this)
        };
		
        $.fn.slideIn = function(width,left,offset,callback) {
            if (width == '') {
                width = $(this).width();
            }
			
            $(this).stop().css({
                width   : width,
                left    : left - offset,
                display : 'block',
                opacity : 0
            }).animate({
                left    : '+=' + offset,
                opacity : 1
            },400,callback);
	
            return $(this)
        }
	
        function hidePopup(id){
            $('table#'+id+'_popup').hidePopup();
            $('a#'+id).removeClass('popupShown');
        }
	
        function delayHidePopup(id){
            if (hideDelayTimer) clearTimeout(hideDelayTimer);
            hideDelayTimer = setTimeout(function(){
	
                hideDelayTimer = null;
                hidePopup(id);
				
            }, hideDelay);
	        
            return false;
        }
		
        /* Popup functions END */
		
        $(window).resize(function(){
            if ($(window).height() - $('body').height() > 0) {
                $('.footer-screen, .footer').css({
                    position : 'fixed',
                    bottom   : 0
                });
                $('.footer').css({
                    left     : ($(window).width()-960)/2
                });
            } else {
                $('.footer-screen').css({
                    position : 'absolute'
                });
                $('.footer').css({
                    left     : 0,
                    position : 'relative'
                });
            }
        }).resize();
		
        $('input[type="checkbox"]').addClass('checkbox');
        $('input[type="datetime"]').addClass('datetime');
        $('input[type="email"]').addClass('email text');
        $('input[type="url"]').addClass('url text');
        $('input[type="file"]').addClass('file');
        $('input[type="image"]').addClass('image');
        $('input[type="password"]').addClass('password text');
        $('input[type="radio"]').addClass('radio');
        $('input[type="reset"]').addClass('reset');
        $('input[type="submit"]').addClass('submit');
        $('input[type="text"]').addClass('text');
        $('input').filter('.labelFilled').each(function(){
            var $input = $(this);
            var label = $(this).attr('data-label');
            $(this)
            .focus(function(){
                if ($input.attr('value') == label)
                    $input.removeAttr('value');
            })
            .blur(function(){
                if ($input.attr('value') == '')
                    $input.attr('value',label);
            })
            .parentsUntil('form').parent().submit(function(){
                if ($input.attr('value') == label) {
                    $input.removeAttr('value');
                    setTimeout(function(){
                        if ($input.hasClass('mce_inline_error') && $input.attr('value') == '')
                            $input.attr('value',label);
                    },0)
                }
            });
        });
        $('textarea.elastic').elastic();
	
        $('#search-form .search-icon').click(function(e){
            e.preventDefault();
            if ($('#search').attr('value') == 'search')
                $('#search').removeAttr('value');
			
            $('#search-form').submit();
        });
			
        $('.tooltip').tooltip().click(function(e){
            e.preventDefault();
            return false;
        });
	
        if ($('.destinations-nav').length) {
			
            /* Destinations browser: Append list */
            function append_list (listItem,cls,id,name,href,ajaxurl){
                $(listItem).append('<li><a class="'+cls+'" id="'+id+'" href="'+href+'" data-ajaxurl="'+ajaxurl+'">'+name+'</a></li>');
            };
	
            function showCountries() {
                $("#dest_country").show();
				
                var offset = 15;
	
                if ($('div#countriesPanel ul li').length > 9) {
                    var width = 180;
                } else {
                    var width = 160;
                }
				
                var left = 181;
				
                $('div#countriesPanel').slideIn(width,left,offset,function(){
                    showDestinations();
                });
            }
			
            function showDestinations() {
                $('#dest_dest_1, #dest_dest_2, #dest_dest_3').show();
				
                var offset = 15;
				
                if ($('div#countriesPanel ul li').length > 9) {
                    var left = 382;
                } else {
                    var left = 362;
                }
				
                if ($('div#destinationsPanel ul li').length > 27) {
                    var width = 500;
                } else {
                    var width = 480;
                }
	
                $('div#destinationsPanel').slideIn(width,left,offset);
            }
			
            // Hide destinations browser
            $('body').click(function(e){
                if ($('#regionsPanel').is(':visible')) {
                    $('.destinationsPanel').stop().fadeOut().find('li.selected').removeClass('selected').find('a').removeClass('loading');
                }
            });

            $('.destinationsPanel').click(function(e){
                e.stopPropagation();
            });
			
            // Show destinations browser
            $('a[href=#regionsPanel]').click(function(e){
                e.preventDefault();
			
                if ($('#regionsPanel').is(':visible')) {
                    $('.destinationsPanel').fadeOut().find('li.selected').removeClass('selected').find('a').removeClass('loading');
                } else {
                    $('div#regionsPanel').stop().css({
                        top     : 14,
                        display : 'block',
                        opacity : 0
                    }).animate({
                        top     : '+=' + 10,
                        opacity : 1
                    },400);
                }
				
                return false;
            });
	
            // Highlight selected item
            $('div.destinationsList li:not(.selected) a.more').live('mouseup',function(e){
                $(this)
                .parent()
                .parent()
                .find('li').removeClass('selected')
                .find('a').removeClass('loading')
                .end()
                .end()
                .end()
                .addClass('selected');
            });
	
            // Region selected
            $('div#regionsPanel li a.more').click(function(e){
                e.preventDefault();
							
                var $link = $(this);
                $(this).addClass('loading');
                $('div#countriesPanel, div#destinationsPanel').hide().filter('#destinationsPanel').find('a#allDestinations').html('Display these search results').attr('href',$(this).attr('href'));
                $("#dest_country, #dest_dest_1, #dest_dest_2, #dest_dest_3").empty().hide();
                // Load countries and destinations
                $.ajax({
                    url      : $link.attr('data-ajaxurl'),
                    type     : 'GET',
                    dataType : 'json',
                    complete  : function(jqXHR){
                        $link.removeClass('loading');
                        var i = 0;
                        var j = 0;
                        var data_a = new Array();
                        var data_b = new Array();
                        var data = $.parseJSON(jqXHR.responseText);
                        var dest_data = data[1];
                        data = data[0];
                        var list_bound = Math.round(dest_data.length/3);
	
                        // Load countries
                        $.each(data, function(key, value) {
                            $.each(data[i], function(key, value) {
                                data_a.push(value);
                            });
                            append_list("#dest_country",'a_country more',data_a[0],data_a[1],countrySearchPreURL+data_a[0],data_a[2]);
                            data_a.pop();
                            data_a.pop();
                            data_a.pop();
                            i++
                        });
						
                        // Load destinations
                        var n = 0;
                        var k = 1;
                        $.each(dest_data, function(key, value) {
                            $.each(dest_data[j], function(key, value) {
                                data_b.push(value);
                            });
                            if(dest_data.length > 8){
                                if(n >= list_bound){
                                    k = k + 1;
                                    n = 0;
                                }
                            }
                            append_list("#dest_dest_" + k,'a_dest',data_b[0],data_b[1],destSearchPreURL+data_b[0],'');
                            data_b.pop();
                            data_b.pop();
                            n++;
                            j++;
                        });
	
                        // Country selected
                        $('div#countriesPanel li a.more').click(function(e){
                            e.preventDefault();
                            var $link = $(this);
                            var url = $(this).attr('href');
                            var ajaxurl = $(this).attr('data-ajaxurl');
							
                            $(this).addClass('loading');
                            $('div#destinationsPanel').fadeOut('fast').find('a#allDestinations').html('Display these search results').attr('href',url);

                            $("#dest_dest_1, #dest_dest_2, #dest_dest_3").empty();
                            // Load destinations
                            $.ajax({
                                url      : ajaxurl,
                                type     : 'GET',
                                dataType : 'json',
                                complete  : function(jqXHR){
                                    $link.removeClass('loading');
                                    var i = 0;
                                    var data = $.parseJSON(jqXHR.responseText);
                                    var data_a = new Array();
                                    var n = 0;
                                    var k = 1;
                                    var list_bound = Math.round(data.length/3);
				                    
                                    $.each(data, function(key, value) {
                                        $.each(data[i], function(key, value) {
                                            data_a.push(value);
                                        });
                                        if(data.length > 9){
                                            if(n >= list_bound){
                                                k = k + 1;
                                                n = 0;
                                            }
                                        }
                                        append_list("#dest_dest_" + k,'a_dest',data_a[0],data_a[1],destSearchPreURL+data_a[0],'');
                                        data_a.pop();
                                        data_a.pop();
                                        n++;
                                        i++;
                                    });
				                    
                                showDestinations(); //#destinationsPanel must be hidden before AJAX call for Destinations panel transition
                                }
                            });
							
                            return false;
                        });
	
                        showCountries();
                    }
                });
			
                return false;
            });
			
        }
		
        if (($('div#loginForm').length) && ($('a[href=#loginForm]').length)) {
            $('div#loginForm').hide();
            $('a[href=#loginForm]').click(function(e){
                e.preventDefault();
				
                if (!$('div#loginForm').is(':visible')) {
                    $('div#loginForm').fadeIn(400);
                    $('input#login').focus();
                } else {
                    $('div#loginForm').hide();
                }
	
                return false;
            });
	
            $('body').click(function(e){
                if ($('div#loginForm').is(':visible')) {
                    $('div#loginForm').stop().fadeOut();
                }
            });
			
            $('div#loginForm').click(function(e){
                e.stopPropagation();
            });
	
        }
		
        if ($('.destinationItem').length) {
            var distance = 7;
            var time = 250;
            var hideDelay = 800;
            var hideDelayTimer = null;
	        
            var beingShown = false;
            var shown = false;
            var id;
	            
            $('.destinationItem').each(function(i){
                var $link = $(this);
                id = $link.attr('id');
                var $linkSection = $('#reportContent');
                var $linkMeta = $(this).find('>span');
                $link.click(function(e){
                    return false;
                });
								
                if ($linkMeta.length) {
                    var name    = $linkMeta.find('.destinationName').text();
                    var phone   = $linkMeta.find('.destinationPhone').text();
                    var fax     = $linkMeta.find('.destinationFax').text();
                    var email   = $linkMeta.find('.destinationEmail').text();
                    var website = $linkMeta.find('.destinationWebsite').text();
                    var address = $linkMeta.find('.destinationAddress').html();
                    var mapURL = $linkMeta.find('.destinationMap').text();
                    var addressBookURL = $linkMeta.find('.destinationAddressBook').text();

                    var $popup = $('<table />');
                    var popupHtml = '';
					
                    popupHtml += '<tbody><tr><td class="corner topleft"></td><td class="top"></td><td class="corner topright"><a href="#" class="closePopup"></a></td></tr><tr><td class="left"></td><td class="popup-contents"><table><tbody><tr><td colspan="2" class="nameAddress"><h6>'+name+'</h6>';
					
                    if (address != '') popupHtml += '<p>'+address+'</p></td></tr>';
                    else popupHtml += '</td></tr>';
                    if (phone != '') popupHtml += '<tr><th>T:</th><td>'+phone+'</td></tr>';
                    if (fax != '') popupHtml += '<tr><th>F:</th><td>'+fax+'</td></tr>';
                    if (email != '') popupHtml += '<tr><td colspan="2"><a href="mailto:'+email+'">Send an email</a></td></tr>';
                    if (website != '') popupHtml += '<tr><td colspan="2"><a target="_blank" href="http://'+website+'">Go to website</a></td></tr>';
                    popupHtml += '<tr><td>&nbsp;</td><td>&nbsp;</td></tr>';
                    if (mapURL != '') popupHtml += '<tr><td colspan="2" class="viewOnMap"><a href="'+mapURL+'">View on Map</a></td></tr>';
                    if (addressBookURL != '') popupHtml += '<tr><td colspan="2" ><p><a href="'+addressBookURL+'">View Address Book</a></td></tr>';
					
                    popupHtml += '</tbody></table></td><td class="right"></td> </tr><tr><td class="corner bottomleft"></td><td class="bottom"></td><td class="corner bottomright"></td></tr></tbody>';
					
                    $popup.html(popupHtml).appendTo($linkSection).addClass('popup').css({
                        'opacity' : 0
                    }).attr('id',id+'_popup');
			
                    $link.mouseover(function(e){
                        if (hideDelayTimer) clearTimeout(hideDelayTimer);
                        if ((beingShown || shown) && !(id != $(this).attr('id'))) {
                            // don't trigger the animation again
                            return;
                        } else {
                            // reset position of popup box
                            beingShown = true;
				            
                            if ((id != '') && (id != $(this).attr('id')))
                                hidePopup(id);
				            
                            id = $(this).attr('id');
                            $(this).showPopup(e);
                            if ('createTouch' in document) {
                                $(this).addClass('popupShown');
                            }
                        }
				        
                        return false;
                    }).mouseout(function(e){
                        delayHidePopup(id);
                    });
                }
	
            });
			
            if ('createTouch' in document) {
                $('a.closePopup').show().click(function(e){
                    e.preventDefault();
					
                    $(this).parentsUntil('.section').parent().find('.popup').animate({
                        top: '-=' + distance + 'px',
                        opacity: 0
                    }, time, 'swing', function () {
                        shown = false;
                        $(this).css({
                            'z-index': -99
                        }).removeClass('popupAbove popupBelow')
                    });
					
                    $('a.destinationItem').removeClass('popupShown');
					
                    return false;
                });
            }
        }
	
        if (!('createTouch' in document)) {
            var $nav = $('body.report div.content-main ul.nav');
            if (($nav.length) && ($(window).height() > $nav.height()) && ($nav.height() < $('body.report div.articleContent').height())) {
                var navOffset = $nav.find('li:eq(0)').offset().top - 28;
                if (!('createTouch' in document)) {
                    $(window).scroll(function(){
                        if ($(window).scrollTop() > navOffset) {
                            $nav.addClass('fixedFloat').css({
                                top : 28
                            });
                        } else {
                            $nav.removeClass('fixedFloat');
                        }
                    }).scroll();
                }
            }
        }
    });
