﻿function rotate() {
    if (rotatorCurrent > rotatorImages.length - 1) { rotatorCurrent = 0; }
    var current = $('#imgRotator').attr('src'); var imgHolder = $('#imgRotator'); imgHolder.closest('div').css('background-image', 'url(' + current + ')'); imgHolder.hide(); imgHolder.attr('src', rotatorImages[rotatorCurrent]); imgHolder.fadeIn(50); rotatorCurrent++;
}
$(document).ready(function () {
    $('.clickable').each(function () {
        var container = $(this); var link = ''; var target = ''; $('a', this).each(function () { link = $(this).attr('href'); target = $(this).attr('target'); }); if (link != '') {
            container.click(function () {
                if (target == '' || target == 'undefined' || target == null) { document.location.href = link; }
                else { window.open(link); } 
            });
        } 
    });
});
