viewing paste fade.js | Javascript

Posted on the
1 2 3 4 5
(function($){jQuery.extend(jQuery.fx.step,{backgroundPosition:function(fx){if(fx.state===0&&typeof fx.end=='string'){var start=$.curCSS(fx.elem,'backgroundPosition');start=toArray(start);fx.start=[start[0],start[2]];var end=toArray(fx.end);fx.end=[end[0],end[2]];fx.unit=[end[1],end[3]];}
var nowPosX=[];nowPosX[0]=((fx.end[0]- fx.start[0])*fx.pos)+ fx.start[0]+ fx.unit[0];nowPosX[1]=((fx.end[1]- fx.start[1])*fx.pos)+ fx.start[1]+ fx.unit[1];fx.elem.style.backgroundPosition=nowPosX[0]+' '+nowPosX[1];function toArray(strg){strg=strg.replace(/left|top/g,'0px');strg=strg.replace(/right|bottom/g,'100%');strg=strg.replace(/([0-9\.]+)(\s|\)|$)/g,"$1px$2");var res=strg.match(/(-?[0-9\.]+)(px|\%|em|pt)\s(-?[0-9\.]+)(px|\%|em|pt)/);return[parseFloat(res[1],10),res[2],parseFloat(res[3],10),res[4]];}}});})(jQuery);var $i=jQuery.noConflict();jQuery(document).ready(function(){jQuery("body").css("display","none");jQuery("body").fadeIn(1000);jQuery("a.transition").click(function(event){event.preventDefault();linkLocation=this.href;jQuery("body").fadeOut(500,redirectPage);});function redirectPage(){window.location=linkLocation;}
$i('a[href=#top], a[href=#ipboard_body]').click(function(){$i('html, body').animate({scrollTop:0},400);return false;});var backgroundpos=0;var offset=1;function scrollbackground(){offset=(offset<1)?offset+(backgroundpos- 1):offset- 1;jQuery('#sc-branding').css("background-position",+ offset+"px 0");setTimeout(function(){scrollbackground();},100);}
scrollbackground();var customElements2="#search .submit_input, .reputation.positive, .members li.positive";var customElements=".maintitle, #community_app_menu > li.active > a, .ipsSideBlock h3";var customText="#user_navigation a, #main_search, #search_options, #community_app_menu div  li:hover > a, #community_app_menu  li:hover > a, #community_app_menu li.click.click_active > a, #more_apps_menucontentul  li > a:hover";jQuery('#colorpicker').ColorPicker({onSubmit:function(hsb,hex,rgb,el){jQuery(el).val(hex);jQuery(el).ColorPickerHide();jQuery(el).css("borderBottomColor","#"+ hex);jQuery(el).css("backgroundColor","#"+ hex);jQuery(customElements).css("border-bottom-color","#"+ hex);jQuery(customElements2).css("background-color","#"+ hex);jQuery(customText).css("color","#"+ hex);jQuery.cookie('customcolor',hex,{expires:365,path:'/'});},onBeforeShow:function(){jQuery(this).ColorPickerSetColor(this.value);},onChange:function(hsb,hex,rgb){jQuery(customElements).css("border-bottom-color","#"+ hex);jQuery(customElements2).css("background-color","#"+ hex);jQuery(customText).css("color","#"+ hex);jQuery.cookie('customcolor',hex,{expires:365,path:'/'});}}).bind('keyup',function(){jQuery(this).ColorPickerSetColor(this.value);});if((jQuery.cookie('customcolor')!=null)){jQuery(customElements).css("border-bottom-color","#"+ jQuery.cookie('customcolor'));jQuery(customElements2).css("background-color","#"+ jQuery.cookie('customcolor'));jQuery(customText).css("color","#"+ jQuery.cookie('customcolor'));jQuery("#colorpicker").val(jQuery.cookie('customcolor'));}
else{jQuery(customElements).css("border-bottom-color","#C42323");jQuery(customText).css("color","#C42323");}});
Viewed 1097 times, submitted by Snaehild.