/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

//+ Jonas Raoni Soares Silva
//@ http://jsfromhell.com/array/shuffle [v1.0]

if (!Array.prototype.shuffle) {
        Array.prototype.shuffle = function() {
                // Clone this array.
                var result = this.concat();
                var arr=this;
                // Swap each element with another randomly selected one.
                for (var i = 0; i < result.length; i++) {
                        var j = i;
                        while (j == i) {
                                j = Math.floor(Math.random() * result.length);
                        }
                        var contents = result[i];
                        result[i] = arr[j];
                        result[j] = contents;
                }

                return result;
        };
}




var debugging=true;
//alert( typeof (console));
if ((typeof console == "undefined")||(!debugging)){
   
        var console = {
                log: function() {}
        
        };
        jQuery.fn.log = function (msg) { };
} /*else if (!debugging || typeof console.log == "undefined"){
    console.log = function() {};
    jQuery.fn.log = function (msg) { };
 */
else{
        jQuery.fn.log = function (msg) {
                console.log("%s: %o", msg, this);
                return this;
        };
};



$("document").ready(function(){   
     
        $.each(jQuery.browser, function(i, val) {                    
                /*  if(i=="webkit" && parseInt(jQuery.browser.version.substr(0,3))<600){
                        $('.actionLink').css({'-webkit-box-shadow':'none !important'});
                }*/
                });
        $('a.actionLink, button.actionLink, a.icon-play, .videoPlayButton').mouseenter(function(){
            console.log("hover");
                $(this).stop(true,true).delay(1).addClass('linkHover','fast');
        });
        $('a.actionLink, button.actionLink, a.icon-play, .videoPlayButton').mouseleave(function(){
                $(this).stop(true,true).delay(1).removeClass('linkHover','slow');
        });
    
/*  $('a').mouseenter(function(){
                 $(this).stop(true,true)
                 
                
                if(!$(this).attr('originalcolor')){
                        $(this).removeAttr('style').attr('originalcolor',$(this).css('color'))
                }
                //$(this).stop(true,true).delay(0).addClass('linkHover','fast');
                //$(this).stop(true,true).animate('color':'rgb(236,110,33)'rgb(236,110,33) ,'fast');
              $(this).animate({
          color:'rgb(236,110,33)
                },'fast');
        });
		
        $('a').mouseleave(function(){
                // $(this).stop(true,true).delay(0).removeClass('linkHover','fast');
                $(this).stop(true,true).animate({
                       color:'rgb(0,0,0)'
                },'fast');
        });
    
    
    
/*   $('a').hover(function(){
        $('a.linkHover').stop(true,true).removeClass('linkHover').each(function(){
            $(this).delay(100).animate({
                color:($(this).attr('originalcolor'))
            },'normal',function(){
                //$(this).clearQueue();
                });
        });
        $(this).stop(true,true).removeClass('linkHover').removeAttr('style').attr('originalcolor',$(this).css('color')).addClass('linkHover').css({
            color:$(this).attr('originalcolor')
        }).animate({
            color:'rgb(236,110,33)'
        },'fast');
   
        
    },function(){
        $(this).stop(true,true).removeClass('linkHover').animate({
            color:($(this).attr('originalcolor'))
        },'slow',function(){
            // $(this).clearQueue();
            });

                
    });*/
        
    
});





