﻿/*----------------------------------------------------------------------------- 
rodparsley.com Breakthrough Master Page Inline Script

version:   1.0
date:      2011-09-09
author:    Jay Baldwin IV
email:     webmaster at rodparsley dot com
website:   rodparsley.com

version history: 

DATE         AUTHOR     CHANGES
2011-09-09   JJBIV      Initial version
-----------------------------------------------------------------------------*/

$(document).ready(function() {

//    $(".defaultText").focus(function(srcc) {
//        if ($(this).val() == $(this)[0].title) {
//            $(this).removeClass("defaultTextActive");
//            $(this).val("");
//        }
//    });

//    $(".defaultText").blur(function() {
//        if ($(this).val() == "") {
//            $(this).addClass("defaultTextActive");
//            $(this).val($(this)[0].title);
//        }
//    });

//    $(".defaultText").blur();

    $('[data-hover]').each(
        function() {
            $('<img />').attr('src', $(this).attr('data-hover'));
        }
    );

    $('[data-hover]').hover(function() {
        $(this).attr('tmp', $(this).attr('src')).attr('src', $(this).attr('data-hover')).attr('data-hover', $(this).attr('tmp')).removeAttr('tmp');
    }, function() {
        $(this).attr('tmp', $(this).attr('src')).attr('src', $(this).attr('data-hover')).attr('data-hover', $(this).attr('tmp')).removeAttr('tmp');
    });


    $('[data-preload]').each(
        function() {
            $('<img />').attr('src', $(this).attr('preload'));
        }
    );


//    $('.bottom-bar-rotate').hover(
//        function() { $('.bottom-bar-rotate').cycle('pause'); return false; },
//        function() { $('.bottom-bar-rotate').cycle('resume'); return false; }
//    );

//    var IS_MOBILE = IsMobile();

//    if (!IS_MOBILE || IS_MOBILE == null || IS_MOBILE == undefined) {
//        $('.bottom-bar-rotate').cycle({
//            fx: 'fade',
//            speed: 600,
//            timeout: 4000
//        });
//    }
//    else {
//        $('.bottom-bar-rotate').cycle({
//            fx: 'none',
//            speed: 0,
//            timeout: 4000
//        });
//    }

//    $("#fb-login-link").click(function() {
//        fncFacebookCheckConnect();
//    });
    });

    /*function radio() {
        return document.getElementById('sound1');
    }*/
