(function() { var arrImages = new Array(); var arrTips = new Array(); var arrLinks = new Array(); arrImages[0] = 'http://www.stickmanknows.org/photos/bicyclists/tip5.png'; arrTips[0] = 'Bicyclist Tip #5:

Always wear a helmet and never ride with headphones. Helmets dramatically reduce the risk of head injury in a bicycle crash.'; arrLinks[0] = 'http://www.stickmanknows.org/tips/bicyclist/5'; arrImages[1] = 'http://www.stickmanknows.org/photos/bicyclists/tip1.png'; arrTips[1] = 'Bicyclist Tip #1:

Obey all regulatory signs and traffic lights.'; arrLinks[1] = 'http://www.stickmanknows.org/tips/bicyclist/1'; arrImages[2] = 'http://www.stickmanknows.org/photos/bicyclists/tip2.png'; arrTips[2] = 'Bicyclist Tip #2:

Never ride against traffic. When a bicycle and car are moving towards each other, there is much less time to take corrective action. Ride with traffic to avoid potential accidents.'; arrLinks[2] = 'http://www.stickmanknows.org/tips/bicyclist/2'; arrImages[3] = 'http://www.stickmanknows.org/photos/pedestrians/tip5.png'; arrTips[3] = 'Pedestrian Tip #5:

Stay visible after dark and in bad weather.'; arrLinks[3] = 'http://www.stickmanknows.org/tips/pedestrian/5'; arrImages[4] = 'http://www.stickmanknows.org/photos/drivers/tip2.png'; arrTips[4] = 'Motorist Tip #2:

Slow down and obey the posted speed limit.'; arrLinks[4] = 'http://www.stickmanknows.org/tips/motorist/2'; arrImages[5] = 'http://www.stickmanknows.org/photos/pedestrians/tip6.png'; arrTips[5] = 'Pedestrian Tip #6:

Watch out for trucks and buses backing out of parking spaces and driveways.'; arrLinks[5] = 'http://www.stickmanknows.org/tips/pedestrian/6'; arrImages[6] = 'http://www.stickmanknows.org/photos/bicyclists/tip3.png'; arrTips[6] = 'Bicyclist Tip #3:

Be predictable! Use hand signals to tell motorists what you intend to do.'; arrLinks[6] = 'http://www.stickmanknows.org/tips/bicyclist/3'; arrImages[7] = 'http://www.stickmanknows.org/photos/pedestrians/tip7.png'; arrTips[7] = 'Pedestrian Tip #7:

Excessive alcohol consumption can impair the motor skills and judgment of pedestrians just as it does for drivers. Don\'t take the risk.'; arrLinks[7] = 'http://www.stickmanknows.org/tips/pedestrian/7'; arrImages[8] = 'http://www.stickmanknows.org/photos/pedestrians/tip1.png'; arrTips[8] = 'Pedestrian Tip #1:

Cross the street at marked crosswalks and intersections.'; arrLinks[8] = 'http://www.stickmanknows.org/tips/pedestrian/1'; arrImages[9] = 'http://www.stickmanknows.org/photos/bicyclists/tip7.png'; arrTips[9] = 'Bicyclist Tip #7:

Don\'t pass on the right. Motorists may not look for or see a bicycle passing on the right.'; arrLinks[9] = 'http://www.stickmanknows.org/tips/bicyclist/7'; arrImages[10] = 'http://www.stickmanknows.org/photos/pedestrians/tip3.png'; arrTips[10] = 'Pedestrian Tip #3:

Use pedestrian pushbuttons.'; arrLinks[10] = 'http://www.stickmanknows.org/tips/pedestrian/3'; arrImages[11] = 'http://www.stickmanknows.org/photos/drivers/tip4.png'; arrTips[11] = 'Motorist Tip #4:

Look before opening your door.'; arrLinks[11] = 'http://www.stickmanknows.org/tips/motorist/4'; arrImages[12] = 'http://www.stickmanknows.org/photos/pedestrians/tip4.png'; arrTips[12] = 'Pedestrian Tip #4:

Begin crossing the street on "Walk" signal.'; arrLinks[12] = 'http://www.stickmanknows.org/tips/pedestrian/4'; arrImages[13] = 'http://www.stickmanknows.org/photos/pedestrians/tip2.png'; arrTips[13] = 'Pedestrian Tip #2:

Before crossing, look left, right, then left again.'; arrLinks[13] = 'http://www.stickmanknows.org/tips/pedestrian/2'; arrImages[14] = 'http://www.stickmanknows.org/photos/bicyclists/tip9.png'; arrTips[14] = 'Bicyclist Tip #9:

Keep your bike in good repair. Check brakes and tires regularly.'; arrLinks[14] = 'http://www.stickmanknows.org/tips/bicyclist/9'; arrImages[15] = 'http://www.stickmanknows.org/photos/bicyclists/tip8.png'; arrTips[15] = 'Bicyclist Tip #8:

Dress for the weather. Dress in layers so you can adjust to the temperature and always wear bright clothing.'; arrLinks[15] = 'http://www.stickmanknows.org/tips/bicyclist/8'; arrImages[16] = 'http://www.stickmanknows.org/photos/bicyclists/tip4.png'; arrTips[16] = 'Bicyclist Tip #4:

Ride in a straight line to the right of traffic (on two-way streets) and a little more than a car-door width away from parked cars.'; arrLinks[16] = 'http://www.stickmanknows.org/tips/bicyclist/4'; arrImages[17] = 'http://www.stickmanknows.org/photos/bicyclists/tip6.png'; arrTips[17] = 'Bicyclist Tip #6:

Use lights and reflectors at night and when visibility is poor.'; arrLinks[17] = 'http://www.stickmanknows.org/tips/bicyclist/6'; arrImages[18] = 'http://www.stickmanknows.org/photos/pedestrians/tip8.png'; arrTips[18] = 'Pedestrian Tip #8:

Very small children should not cross street by themselves. Make sure your children are aware of pedestrian safety tips and laws.'; arrLinks[18] = 'http://www.stickmanknows.org/tips/pedestrian/8'; arrImages[19] = 'http://www.stickmanknows.org/photos/drivers/tip3.png'; arrTips[19] = 'Motorist Tip #3:

Yield to pedestrians and cyclists when turning.'; arrLinks[19] = 'http://www.stickmanknows.org/tips/motorist/3'; arrImages[20] = 'http://www.stickmanknows.org/photos/drivers/tip6.png'; arrTips[20] = 'Motorist Tip #6:

Allow 3 feet when passing bicyclists.'; arrLinks[20] = 'http://www.stickmanknows.org/tips/motorist/6'; arrImages[21] = 'http://www.stickmanknows.org/photos/drivers/tip5.png'; arrTips[21] = 'Motorist Tip #5:

Be careful when passing stopped vehicles.'; arrLinks[21] = 'http://www.stickmanknows.org/tips/motorist/5'; arrImages[22] = 'http://www.stickmanknows.org/photos/drivers/tip1.png'; arrTips[22] = 'Motorist Tip #1:

Stop for pedestrians at crosswalks.'; arrLinks[22] = 'http://www.stickmanknows.org/tips/motorist/1'; var nCurrent = 0; var nMax = 22; // Localize jQuery variable var jQuery; /******** Load jQuery if not present *********/ if (window.jQuery === undefined || window.jQuery.fn.jquery !== '1.4.2') { var script_tag = document.createElement('script'); script_tag.setAttribute("type","text/javascript"); script_tag.setAttribute("src", "http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"); script_tag.onload = scriptLoadHandler; script_tag.onreadystatechange = function () { // Same thing but for IE if (this.readyState == 'complete' || this.readyState == 'loaded') { scriptLoadHandler(); } }; // Try to find the head, otherwise default to the documentElement (document.getElementsByTagName("head")[0] || document.documentElement).appendChild(script_tag); } else { // The jQuery version on the window is the one we want to use jQuery = window.jQuery; main(); } /******** Called once jQuery has loaded ******/ function scriptLoadHandler() { // Restore $ and window.jQuery to their previous values and store the // new jQuery in our local jQuery variable jQuery = window.jQuery.noConflict(true); // Call our main function main(); } /******** Our main function ********/ function main() { jQuery(document).ready(function($) { /******* Load CSS *******/ var css_link = $("", { rel: "stylesheet", type: "text/css", href: "http://www.stickmanknows.org/widget/stickman-widget.css?unique=20140430154542" }); css_link.appendTo('head'); loadTip(); function loadTip() { $('#stickman-widget').html('
'); $('#stickman-widget').append('
'); $('#stickman-widget').append('
'); $('#stickman-widget').append('
'); $('#stickman-widget-image-cover').animate({ opacity: 0 }, 700, function () { $('#stickman-widget').append('
' + arrTips[nCurrent] + '
'); $('#stickman-widget-image-cover').remove(); nCurrent++; if (nCurrent > nMax) { nCurrent = 1; } }); } $("#stickman-widget-next").live("click",function() { $('#stickman-widget-tip').html(''); $('#stickman-widget-image').animate({ opacity: 0 }, 700, function() { loadTip(); }); }); }); } })(); // We call our anonymous function immediately