// usage: log('inside coolFunc', this, arguments); // paulirish.com/2009/log-a-lightweight-wrapper-for-consolelog/ window.log = function f(){ log.history = log.history || []; log.history.push(arguments); if(this.console) { var args = arguments, newarr; args.callee = args.callee.caller; newarr = [].slice.call(args); if (typeof console.log === 'object') log.apply.call(console.log, console, newarr); else console.log.apply(console, newarr);}}; // make it safe to use console.log always (function(a){function b(){}for(var c="assert,count,debug,dir,dirxml,error,exception,group,groupCollapsed,groupEnd,info,log,markTimeline,profile,profileEnd,time,timeEnd,trace,warn".split(","),d;!!(d=c.pop());){a[d]=a[d]||b;}}) (function(){try{console.log();return window.console;}catch(a){return (window.console={});}}()); /* PLUGINS 1.) jQuery Cycle Plugin - http://jquery.malsup.com/cycle/ */ /** * 1.) jQuery Cycle Plugin - http://jquery.malsup.com/cycle/ */ /** * 2.) hoverIntent r6 // 2011.02.26 // jQuery 1.5.1+ - http://cherne.net/brian/resources/jquery.hoverIntent.html */ (function($){$.fn.hoverIntent=function(f,g){var cfg={sensitivity:7,interval:100,timeout:0};cfg=$.extend(cfg,g?{over:f,out:g}:f);var cX,cY,pX,pY;var track=function(ev){cX=ev.pageX;cY=ev.pageY};var compare=function(ev,ob){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);if((Math.abs(pX-cX)+Math.abs(pY-cY))6)){ return this.each(function() { var currentSelected = $(this).find(':selected'); $(this).after(''+currentSelected.text()+'').css({position:'absolute', opacity:0,fontSize:$(this).next().css('font-size')}); var selectBoxSpan = $(this).next(); var selectBoxWidth = parseInt($(this).width()) - parseInt(selectBoxSpan.css('padding-left')) -parseInt(selectBoxSpan.css('padding-right')); var selectBoxSpanInner = selectBoxSpan.find(':first-child'); selectBoxSpan.css({display:'inline-block'}); selectBoxSpanInner.css({width:selectBoxWidth, display:'inline-block'}); var selectBoxHeight = parseInt(selectBoxSpan.height()) + parseInt(selectBoxSpan.css('padding-top')) + parseInt(selectBoxSpan.css('padding-bottom')); $(this).height(selectBoxHeight).change(function(){ // selectBoxSpanInner.text($(this).val()).parent().addClass('changed'); This was not ideal selectBoxSpanInner.text($(this).find(':selected').text()).parent().addClass('changed'); // Thanks to Juarez Filho & PaddyMurphy }); }); } } }); })(jQuery); /** * 4.) Screenshot Preview * written by Alen Grakalic (http://cssglobe.com) ** for more info visit http://cssglobe.com/post/1695/easiest-tooltip-and-image-preview-using-jquery */ this.screenshotPreview = function(){ /* CONFIG */ xOffset = -30; yOffset = -370; // these 2 variable determine popup's distance from the cursor // you might want to adjust to get the right result /* END CONFIG */ $(".screenshot").hover(function(e){ this.t = this.title; this.title = ""; var c = (this.t != "") ? "
" + this.t : ""; $("body").append("

url preview"+ c +"

"); $("#screenshot") .css("top",(e.pageY - xOffset) + "px") .css("left",(e.pageX + yOffset) + "px") .fadeIn("fast"); }, function(){ this.title = this.t; $("#screenshot").remove(); }); $(".screenshot").mousemove(function(e){ $("#screenshot") .css("top",(e.pageY - xOffset) + "px") .css("left",(e.pageX + yOffset) + "px"); }); };