<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" version="2.0">

<channel>
	<title>Marcell Jusztin</title>
	
	<link>http://www.marcelljusztin.com/blog</link>
	<description>Showcase and blog of web designer, developer professionalist, Marcell Jusztin</description>
	<lastBuildDate>Thu, 01 Dec 2011 16:55:09 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/weblabmarcelljusztin" /><feedburner:info xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" uri="weblabmarcelljusztin" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>Making good design is easy. It’s polishing the half-assed stuff that takes time.</title>
		<link>http://www.marcelljusztin.com/blog/quote/making-good-design-is-easy/</link>
		<comments>http://www.marcelljusztin.com/blog/quote/making-good-design-is-easy/#comments</comments>
		<pubDate>Fri, 15 Jul 2011 14:12:45 +0000</pubDate>
		<dc:creator>Marcell</dc:creator>
				<category><![CDATA[Quote]]></category>

		<guid isPermaLink="false">http://www.marcelljusztin.com/blog/?p=211</guid>
		<description />
			<content:encoded />
			<wfw:commentRss>http://www.marcelljusztin.com/blog/quote/making-good-design-is-easy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CSS 3 Animated Menu</title>
		<link>http://www.marcelljusztin.com/blog/css-3/css-3-animated-menu/</link>
		<comments>http://www.marcelljusztin.com/blog/css-3/css-3-animated-menu/#comments</comments>
		<pubDate>Thu, 14 Jul 2011 17:19:55 +0000</pubDate>
		<dc:creator>Marcell</dc:creator>
				<category><![CDATA[CSS 3]]></category>

		<guid isPermaLink="false">http://www.marcelljusztin.com/blog/?p=184</guid>
		<description><![CDATA[This short script will show you how to create a colorful, yet simple and elegant navigation menu using nothing but CSS 3.]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"><a class="awesome blue" href="http://www.marcelljusztin.com/stuff/nice-menu/css-menu-2.html">View Demo</a> <a class="awesome orange" href="http://www.marcelljusztin.com/blog/downloads/CSS-3-Nice-Menu">Download CSS</a></p>
<h4>UPDATE</h4>
<p style="text-align: left;">I have released a new version. You no longer have to update the width everywhere, just set the desired size by giving a value to the ul.nice-menu class. The old version is still available for download from <a href = "http://www.marcelljusztin.com/blog/downloads/CSS-3-Nice-Menu">here</a></p>
<p style="text-align: left;">This short script will show you how to create a colorful, yet simple and elegant navigation menu using nothing but CSS 3. Since the latest version of CSS and mainly it&#8217;s animation part is not supported by all <em>&#8216;major&#8217;</em> browsers the code below will not be working in these browsers, instead it is going to nicely degrade to a similar but inanimated one.</p>
</p>
<h4>The HTML</h4>
<pre name="code" language="HTML">
<ul class = "nice-menu">
<li class = "orange"><a href = "">Home</a></li>
<li class = "red"><a href = "">About</a></li>
<li class = "green"><a href = "">Portfolio</a></li>
<li class = "blue"><a href = "">Blog</a></li>
<li class = "bright"><a href = "">Contact</a></li>
<li class = "dark"><a href = "">What not?</a></li>
</ul>
</pre>
<p>As you can see the HTML code is quite simple, just an ordinary list filled with anchor elements. Only the main <code>nice-menu</code> class is necessary, the rest is the coloring which is optional. Six colors are available by default: red, orange, green, blue, bright, dark.</p>
<h4>Styling</h4>
<p>CSS 3 introduced a set of new properties which makes designer&#8217;s life even more easier. With these properties you can substitute many of the plain old javascript framework solutions unless you mind those pesky IE browsers. You can read more about CSS animations at <a href="http://css3.bradshawenterprises.com/" target = "_blank">Brad Shaw&#8217;s amazing website</a></p>
<p>I&#8217;ve implemented two kind of animations: the default one with ease-in and out, and another one with bounce-in and out. To use the latter one you just have to add the <code>bounce</code> class to the <code>ul</code>:</p>
<pre name="code" language="html">
<ul class = "nice-menu bounce"></ul>
</pre>
<p>There is one more additional class that you can use: <code>tight</code>, which removes the space between list elements.</p>
<pre name="code" language="html">
<ul class = "nice-menu tight"></ul>
</pre>
<h4>Conclusion</h4>
<p>Thanks for stopping by. Please feel free to download and customize the code, also I would be grateful for leaving your feedback in the comment section below.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.marcelljusztin.com/blog/css-3/css-3-animated-menu/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>Exchange Rates and Stock Quotes with YQL and jQuery</title>
		<link>http://www.marcelljusztin.com/blog/javascript/exchange-rates-and-stock-quotes-with-yql-and-jquery/</link>
		<comments>http://www.marcelljusztin.com/blog/javascript/exchange-rates-and-stock-quotes-with-yql-and-jquery/#comments</comments>
		<pubDate>Sat, 09 Jul 2011 19:26:34 +0000</pubDate>
		<dc:creator>Marcell</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Yahoo]]></category>
		<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://www.marcelljusztin.com/blog/?p=134</guid>
		<description><![CDATA[Lately I was in need of a financial gadget that can provide stock exchange and currency data. I guess it goes without saying that you can find many solutions for the problem; in my case though none of them (that I found) was good enough to work with. I needed a free, reliable and highly customizable API. Unfortunately most of the free ones either come with an ugly copyright line which means a no go (why would you want to advertise your competition?), or they have some customization issues.]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"><a class="awesome" title="View Demo" href="http://www.marcelljusztin.com/blog/downloads/YQL-Finance-Demo" target="_blank">View Demo</a></p>
<p style="text-align: left;">Lately I was in need of a financial gadget that can provide stock exchange and currency data. I guess it goes without saying that you can find many solutions for the problem; in my case though none of them (that I found) was good enough to work with. I needed a free, reliable and highly customizable API. Unfortunately most of the free ones either come with an ugly copyright line which means a no go (why would you want to advertise your competition?), or they have some customization issues.</p>
<p>Since Google is no longer supporting it&#8217;s financial APIs (also it was a huge overkill compared to my simple needs) I found that Yahoo!&#8217;s Open Data Tables provides exactly what I want. It is well documented, easy-to-use, customizable and free (for my notes about reliability check out the last section of this post).</p>
<p>The code utilizes built-in ajax feature of jQuery. The URL of the request consists of three parts: the base url (http://query.yahooapis.com/v1/public/yql), the YQL query (you can read more about YQL <a href="http://developer.yahoo.com/yql/">here</a>) and the configuration parameters (format=JSON etc.). </p>
<h4>Query Processing</h4>
<pre name="code" class="javascript">
function YQLRequest( queryString, callback ){
  var url = "http://query.yahooapis.com/v1/public/yql?q=" + queryString +
         "&#038;format=json&#038;env=http://datatables.org/alltables.env&#038;callback=?",
  jQuery.getJSON(url, callback);
}
</pre>
<h4>Stock Quote</h4>
<pre name="code" class="javascript">
function getQuotes(){
  var q = escape( 'select * from yahoo.finance.quotes where symbol in ("AAPL","GOOG")' );
  YQLRequest( q, processQuotes );
}         

function processQuotes( data ){
  var quotes = data.query.results.quote;
  for( var i in quotes ) {
    // Do whatever you want with your data
    alert( quotes[i].Name + ' - ' + quotes[i].Ask + ' - ' + quotes[i].Bid );
  }
}
</pre>
<h4>Exchange Rates</h4>
<pre name="code" class="javascript">
function getExchangeRates(){
  var q = escape( 'select * from yahoo.finance.xchange where pair in ("EURUSD","USDCAD")' );
  YQLRequest( q, processExchangeRates );
}         

function processExchangeRates( data ){
  var rates = data.query.results.rate;
  for( var i in rates ) {
    // Do whatever you want with your data
    alert( rates[i].Name + ' - ' + rates[i].Ask + ' - ' + rates[i].Bid );
  }
}
</pre>
<h2>Reliability</h2>
<p>While I was working on the script I had noticed some unexpected issues: null values and rejected requests. The latter one might be caused by the usage limit (1000 requests / hour / IP), but the problem was persistent even after an IP renewal. For this reason I implemented a cache which checks whether the response contains the expected values, if not, it serves the previous version from the cache.</p>
<h2>To whom it may concern</h2>
<p>When you work with YQL you might want to consider the following few rules and notes taken from the official site. You can find out more at the <a title="Yahoo! Developer Network" href="http://developer.yahoo.com/yql/" target="_blank">Yahoo! Developer Network</a>.</p>
<p><strong>Notice</strong></p>
<ul style="margin-left: 20px;">
<li>YQL can be used for commercial     purposes</li>
<li>If we&#8217;re going to shut down YQL, we     will give you at least 6 months notice with an     announcement on this web page and in our forum</li>
<li>YQL has a performance uptime target     of over 99.5%</li>
</ul>
<p><strong>Usage Limits</strong></p>
<ul style="margin-left: 20px;">
<li>Per application limit (identified     by your Access Key): 100,000 calls per day</li>
<li>Per IP limits: /v1/public/*: 1,000     calls per hour; /v1/yql/*: 10,000 calls per hour</li>
</ul>
<p><strong>Additional Notes</strong></p>
<ul style="margin-left: 20px;">
<li>All rates are subject to     change</li>
<li>You may also be subject to the     underlying rate limits of other Yahoo! and 3rd party     web services</li>
<li>YQL relies on the correct operation     of the web services and content providers it     accesses</li>
</ul>
<p><strong>1st UPDATE</strong></p>
<p>Since jQuery has introduced getJSON method I decided its time to refactor my code. This method is basically just a shortcode for an AJAX call optimized for JSON, but possible could save some bytes and improve readabilty.</p>
<p><strong>2nd UPDATE</strong></p>
<p>It turned out that Internet Explorer doesn&#8217;t want to play nicely with cross domain requests (thanks everyone for the feedbacks). To resolve the issue I appended the <i>callback</i> parameter to the URL to force jQuery to use JSONP instead of plain JSON. The new version should support IE from now on.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.marcelljusztin.com/blog/javascript/exchange-rates-and-stock-quotes-with-yql-and-jquery/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Animated counter in ActionScript 3 and Flash</title>
		<link>http://www.marcelljusztin.com/blog/actionscript/animated-counter-in-actionscript-3-and-flash/</link>
		<comments>http://www.marcelljusztin.com/blog/actionscript/animated-counter-in-actionscript-3-and-flash/#comments</comments>
		<pubDate>Tue, 19 Oct 2010 11:35:04 +0000</pubDate>
		<dc:creator>Marcell</dc:creator>
				<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Counter]]></category>

		<guid isPermaLink="false">http://www.marcelljusztin.com/blog/?p=98</guid>
		<description><![CDATA[Old school electro magnetic counter.]]></description>
			<content:encoded><![CDATA[<div style="width: 200px; margin: 0pt auto; text-align: center; border: 5px solid #ffffff; outline: 1px solid #666666;">
<object width="200" height="40">
<param name="movie" value="http://www.marcelljusztin.com/stuff/counter/Jackpot.swf"></param>
<param name="quality" value="high"></param>
<param name="wmode" value="transparent"></param>
<param name="menu" value="false"></param>
<param name="bgcolor" value="#FFFFFF"></param>
<embed type="application/x-shockwave-flash" width="200" height="40" src="http://www.marcelljusztin.com/stuff/counter/Jackpot.swf" quality="high" bgcolor="#FFFFFF" wmode="transparent" menu="false" ></embed>
</object>
</div>
<p style="text-align: center;"><a title="Download Source Files" href="http://www.marcelljusztin.com/stuff/counter/counter.rar" class = "awesome green">Download Source Files</a></p>
<p style="text-align: left;">The idea</p>
<p>I few weeks ago I was asked to create a counter for a website. The first thing came into my mind was an old-school ticker used on old cassette players. The key is the seamless flow of numbers. To achieve the effect I&#8217;ve created an image with all the digits below each other from 9 to 0 then I added 9, 8 and 7 to the end of it. I needed to be careful and place the numbers to their exact position. By doing so you make everything a lot more easier later on, because you won&#8217;t have to doodle with adjusting.</p>
<p>In the next step I created a new Movie Clip and I put the digits into it, then converted them to MCs as well. Here is the class for digits:</p>
<pre name = "code" class="javascript">
package  {

	import flash.display.MovieClip;
	import com.greensock.*
	import com.greensock.easing.*

	public class Digit extends MovieClip{

		private var currentValue:Number = 0;
		private var nextDigit:Digit = null;
		private var assoc:Array = new Array(-135, -105, -75, -45, -15, 15, 45, 75, 105, -165);
		private var speed:Number = 0.09;

		public function Digit() {

		}

		public function setCurrentValue(v:Number):void {
			currentValue = v;
			this.y = assoc[v];
		}

		public function setNextDigit(d:Digit):void {
			nextDigit = d;
		}

		public function setSpeed(s:Number):void {
			speed = s;
		}

		public function s(v:Number):void {
			currentValue = v;
			update();
		}

		public function update():void {
			if(currentValue == 0) if(nextDigit) nextDigit.update();
			if(currentValue == 8 ) TweenLite.to(this, speed, { y:this.assoc[currentValue], onComplete:isEight } ); else TweenLite.to(this, speed, { y:this.assoc[currentValue] } );
			currentValue++;
			if(currentValue == 10) currentValue = 0;
		}

		public function isEight(){
			 this.y = -195;
		}

	}

}
</pre>
<p>One of the most important part is the assoc array. It stores the assigned coordinates of the digits, you can fine tune them if needed. I tried to name and make everything self-explanatory. The best is to download the source code and check how things related to each other.</p>
<p>Have fun</p>
]]></content:encoded>
			<wfw:commentRss>http://www.marcelljusztin.com/blog/actionscript/animated-counter-in-actionscript-3-and-flash/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Analog Clock with using CSS3′s transform property</title>
		<link>http://www.marcelljusztin.com/blog/news/analog-clock-with-using-css3s-transform-property/</link>
		<comments>http://www.marcelljusztin.com/blog/news/analog-clock-with-using-css3s-transform-property/#comments</comments>
		<pubDate>Fri, 30 Jul 2010 13:33:48 +0000</pubDate>
		<dc:creator>Marcell</dc:creator>
				<category><![CDATA[News]]></category>
		<category><![CDATA[analog]]></category>
		<category><![CDATA[clock]]></category>
		<category><![CDATA[css3]]></category>
		<category><![CDATA[gecko]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[transform]]></category>
		<category><![CDATA[webkit]]></category>

		<guid isPermaLink="false">http://www.marcelljusztin.com/blog/?p=94</guid>
		<description><![CDATA[This little "app" creates a very simple, minimalist analog clock using CSS3's transform property. Even though CSS3 supports transitions and effect can be made by using only pure CSS I have decided to implement the update function in javascript since Firefox doesn't support the transition property (yet; because Firefox 4 will do).]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"><a title="Analog Clock Demo" href="http://www.marcelljusztin.com/stuff/css-clock/index.html" target="_blank" class = "awesome green">DEMO</a></p>
<p style="text-align: left;">Supported (major) browsers: Firefox 3.5+, Safari 4+, Chrome 2+</p>
<p style="text-align: left;">This little &#8220;app&#8221; creates a very simple, minimalist analog clock using CSS3&#8242;s transform property. Even though CSS3 supports transitions and effect can be made by using only pure CSS I have decided to implement the update function in javascript since Firefox doesn&#8217;t support the transition property (yet; because Firefox 4 will do).</p>
<h2>The Code</h2>
<h4>HTML</h4>
<pre name = "code" class = "html">
<div id="clock">
<div id="hand"></div>
<div id="minutehand"></div>
<div id="hourhand"></div>
</div>
</pre>
<h4>The CSS</h4>
<pre name = "code" class = "css">
div#clock {
	width: 300px;
	height: 300px;
	background: #EEEEEE;
	border: 1px solid #AAAAAA;
	-moz-border-radius: 150px;
	-webkit-border-radius: 150px;
	border-radius: 150px;
	position: relative;
}

div#clock div {
	position: absolute;
	-webkit-transform-origin: bottom;
	-moz-transform-origin: bottom;
}

div#hand {
	width: 2px;
	height: 130px;
	background: #FF0000;
	margin-left: 152px;
	margin-top: 20px;
	-moz-border-radius: 5px;
}

div#minutehand {
	width: 5px;
	height: 130px;
	background: #000000;
	margin-left: 150px;
	margin-top: 20px;
	-moz-border-radius: 5px;
}

div#hourhand {
	width: 5px;
	height: 90px;
	background: #000000;
	margin-left: 150px;
	margin-top: 60px;
	-moz-border-radius: 5px;
}
</pre>
<pre name = "code" class = "javascript">
var s = 0;
var m = 0;
var h = 0;

function setup(){
	var angle = 360/60;
	var date = new Date();
	var hour = date.getHours();
	if(hour > 12) hour = hour - 12;
	var minute = date.getMinutes();
	var second = date.getSeconds();
	var hourAngle = (360/12)*hour + (360/(12*60))*minute;
	m = angle*minute;
	s = angle*second;
	h = hourAngle;
	rotatehand();
	rotateminute();
	rotatehour();
	setInterval(rotatehand, 1000);
}			

function rotatehand(){
	var style = "-moz-transform: rotate(" + (s) + "deg);";
	style += "-webkit-transform: rotate(" + (s) + "deg);"
	$("#hand").attr("style", style);
	if(s%360==0) { rotateminute(); rotatehour(); }
	s = s + 6;
}

function rotateminute(){
	var style = "-moz-transform: rotate(" + (m) + "deg);";
	style += "-webkit-transform: rotate(" + (m) + "deg);"
	$("#minutehand").attr("style", style);
	m = m + 6;
}

function rotatehour(){
	var style = "-moz-transform: rotate(" + (h) + "deg);";
	style += "-webkit-transform: rotate(" + (h) + "deg);"
	$("#hourhand").attr("style", style);
	h = h + 0.5;
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.marcelljusztin.com/blog/news/analog-clock-with-using-css3s-transform-property/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Quick goodie: AJAX, PHP Powered Contact Form</title>
		<link>http://www.marcelljusztin.com/blog/jquery/quick-goodie-ajax-php-powered-contact-form/</link>
		<comments>http://www.marcelljusztin.com/blog/jquery/quick-goodie-ajax-php-powered-contact-form/#comments</comments>
		<pubDate>Thu, 22 Jul 2010 10:07:35 +0000</pubDate>
		<dc:creator>Marcell</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://www.marcelljusztin.com/blog/?p=86</guid>
		<description><![CDATA[A simple jQuery, AJAX, PHP powered contact form considering real-world metaphors.]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"><a title="Download the code" href="http://www.marcelljusztin.com/blog/downloads/Contact%20Form" class = "awesome green">DOWNLOAD</a> <a title="Try a working demo" href="http://www.marcelljusztin.com/stuff/contact-form/index.html" class = "awesome blue">DEMO</a></p>
<p>A nice, little contact form. Hope you like it; feel free to use it on your site. Design idea by Beata Szabo.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.marcelljusztin.com/blog/jquery/quick-goodie-ajax-php-powered-contact-form/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>jQuery plugin – Floating Boxes with motion blur and easing</title>
		<link>http://www.marcelljusztin.com/blog/javascript/jquery-plugin-floating-boxes-with-motion-blur-and-easing/</link>
		<comments>http://www.marcelljusztin.com/blog/javascript/jquery-plugin-floating-boxes-with-motion-blur-and-easing/#comments</comments>
		<pubDate>Mon, 12 Jul 2010 12:14:55 +0000</pubDate>
		<dc:creator>Marcell</dc:creator>
				<category><![CDATA[CSS 3]]></category>
		<category><![CDATA[HTML 5]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[css3]]></category>
		<category><![CDATA[floatingbox]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jquery]]></category>

		<guid isPermaLink="false">http://www.marcelljusztin.com/blog/?p=52</guid>
		<description><![CDATA[I’ve started this plugin a few months ago after the first "meeting" with <a href = "http://webdev.stephband.info/parallax.html" target = "_blank">jParallax</a>. I was amazed by the idea; it is so simple but still provides a real-life experience. I was thinking about possible usages, but I was quite busy that time so I could not go any further. Then, somehow I obtained some extra time, so I came up with this]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"><a title="Floating Boxes jQuery plugin download" href="http://www.marcelljusztin.com/blog/downloads/Floating%20box" target = "_blank" class = "awesome green">DOWNLOAD</a> <a title="Floating Boxes jQuery plugin demo" href="http://www.marcelljusztin.com/stuff/jquery-floating-box/floating-box-jquery.html" target="_blank" class = "awesome blue">DEMO</a></p>
<p>
I’ve started this plugin a few months ago after the first &#8220;meeting&#8221; with <a href = "http://webdev.stephband.info/parallax.html" target = "_blank">jParallax</a>. I was amazed by the idea; it is so simple but still provides a real-life experience. I was thinking about possible usages, but I was quite busy that time so I could not go any further. Then, somehow I obtained some extra time, so I came up with this:
</p>
<h2>The Plugin</h2>
<p>
The plugin itself is very lightweight, only a few rows of code.  There are two major &#8220;functions&#8221; which make everything alive: the initialization part sets the timer of the <em>JavaScript</em> engine to a specified frame rate; you can change this value by passing the <code>frameRate</code> variable to the plugin at instantiation. In the next step the plugin binds the mouse movement event to the <code>parent</code> object. The naming may be a little misleading, but it’s trying to say to which object the floating box should be bound to. There is another variable I would like to clarify: the <code>stage</code>. Usually the <code>parent</code> and the <code>stage</code> are the same.  But if you want your box float in a different &#8220;co-ordinate system&#8221; other than the <code>parent</code>’s you have the possibility to do so, just provide a new <code>stage</code>. Back to the mouse event. When the event occurs, the code checks the position of the mouse within the <code>parent</code> object (so NOT the absolute coordinates).
</p>
<p>
The <code>update</code> function is the responsible for the &#8220;flying&#8221;. From the cursor position it calculates how many pixels should the box move. This is where the easing is applied. The math:
</p>
<p>
<code><strong>Delta = (End position – Actual Position) * Easing Factor</strong><br/><br />
<strong>Actual Position = Actual Position + Delta</strong></code>
</p>
<p>
And that’s it. There is an additional motion blur effect which is using the CSS 3 <code>box-shadow</code> and <code>text-shadow</code> properties.
</p>
<h2>The full option list</h2>
<table style = "border:0;">
<tr style = "background: #CCC;">
<td><code>parent</code></td>
<td>default value is &#8216;container&#8217;, see above</td>
</tr>
<tr style = "background: transparent">
<td><code>stage</code></td>
<td>default value is &#8216;container&#8217;, see above</td>
</tr>
<tr style = "background: #CCC;">
<td><code>scale</code></td>
<td>default value is 0.3, this is a proportional value, showing the relation between the <code>stage</code> and the box. For example: the <code>stage</code> is 200px diagonally, the box can move away with 30px from the center (100px * 0.3 = 30px) in every direction.</td>
</tr>
<tr style = "background: transparent">
<td><code>xOffset</code></td>
<td>default value is 0, basically it is the same as the <code>left</code> property in CSS</td>
</tr>
<tr style = "background: #CCC;">
<td><code>yOffset</code></td>
<td>default value is 0, <code>top</code> property</td>
</tr>
<tr style = "background: transparent;">
<td><code>blur</code></td>
<td>default value is true, should the plug-in apply blur on the object? Note: it adds a <code>box-shadow</code> to the element. If you would like to blur a text-type object (<code>h1</code>, <code>p</code>, etc.) see the isText property below.</td>
</tr>
<tr style = "background: #CCC;">
<td><code>isText</code></td>
<td>default value is false, does the <code>blur</code> should be applied on a text-type object? (since you can use the plug-in on a <code>h1</code> or <code>p</code> for example) </td>
</tr>
<tr style = "background: transparent;">
<td><code>blurColor</code></td>
<td>default value is &#8216;#888&#8242;, the color of the shadow. Could be any valid CSS value (including rgba)</td>
</tr>
<tr style = "background: #CCC;">
<td><code>frameRate</code></td>
<td>default value is 33, shows how often the engine should update the animation.</td>
</tr>
</table>
<h2>Additional info</h2>
<p>
Probably you will notice some performance issues while playing with the demo. I’m still working on the plugin to make it faster. Right now it will eat up at least 30-40% of CPU. With a dual core processor is not a big problem, but on slower computers it could cause some problems. In the demo section you find an HTML 5 version as well. I wrote it to check the differences in HTML 5. Unfortunately I didn’t have time yet, but I promise now I&#8217;ll do it as soon as possible. If you are interested in the result please come back later for the updates.
</p>
<p>
If you have anything to say about the plugin leave a comment or find me in email at <a href = "mailto:info@marcelljusztin.com">info@marcelljusztin.com</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.marcelljusztin.com/blog/javascript/jquery-plugin-floating-boxes-with-motion-blur-and-easing/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
		<item>
		<title>Bad artists copy. Great artists steal.</title>
		<link>http://www.marcelljusztin.com/blog/quote/bad-artist-copy-great-artists-steal/</link>
		<comments>http://www.marcelljusztin.com/blog/quote/bad-artist-copy-great-artists-steal/#comments</comments>
		<pubDate>Fri, 09 Jul 2010 12:06:10 +0000</pubDate>
		<dc:creator>Marcell</dc:creator>
				<category><![CDATA[Quote]]></category>
		<category><![CDATA[pablo picasso]]></category>
		<category><![CDATA[quote]]></category>

		<guid isPermaLink="false">http://www.marcelljusztin.com/blog/?p=43</guid>
		<description />
			<content:encoded />
			<wfw:commentRss>http://www.marcelljusztin.com/blog/quote/bad-artist-copy-great-artists-steal/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>jReelGallery – Cross browser fluid jQuery image gallery</title>
		<link>http://www.marcelljusztin.com/blog/javascript/jreelgallery-jquery-image-gallery/</link>
		<comments>http://www.marcelljusztin.com/blog/javascript/jreelgallery-jquery-image-gallery/#comments</comments>
		<pubDate>Fri, 09 Jul 2010 10:12:28 +0000</pubDate>
		<dc:creator>Marcell</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[gallery]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[jreelgallery]]></category>

		<guid isPermaLink="false">http://www.marcelljusztin.com/blog/?p=21</guid>
		<description><![CDATA[This little <em>jQuery</em> image gallery plugin is basicly recreates the standard built-in window scrolling with a smooth easing effect. It is still in an early, development state, thus it may suffer from issues; but I will be working on it to make jReelGallery a more solid and robust widget.]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"><a title="jReelGallery Download" href="http://www.marcelljusztin.com/blog/downloads/jReelGallery" target="_blank" class = "awesome green">DOWNLOAD</a> <a title="jReelGallery Demo" href="http://www.marcelljusztin.com/stuff/reel-gallery/index.php" target="_blank" class = "awesome blue">DEMO</a></p>
<h2>The plugin</h2>
<p style="text-align: left;">This little <em>jQuery</em> image gallery plugin is basicly recreates the standard built-in window scrolling with a smooth easing effect. It is still in an early, development state, thus it may suffer from issues; but I will be working on it to make jReelGallery a more solid and robust widget.</p>
<p style="text-align: left;">The idea came while I was browsing the internet for available galleries for <em>jQuery</em>. I have seen a lot of good solutions but none of them fullfilles all the requirements I have been looking for. I decided to create a new plugin with all the features I need or consider as important: <strong>simplicity</strong>, <strong>usability</strong> and <strong>light-weight code</strong>.</p>
<h2>Usability</h2>
<p style="text-align: left;">Nowdays usability should be a very important and crucial part of a any web project. By extending the availability of your site and presenting it to wider audience, you increase the probability of achieving more visits which is leading to more sales, conversions and success.</p>
<p>In programming soemtimes it is really hard but not impossible at all to be light-weight and userfriendly at the same time. Sometimes you need to sacrifice a few things to stay between of the limits. This time the sacrifice was to give up the degradation when javascript is turned off. Whats left is a nice navigation: the plugin provides several ways to scan through the gallery. Mainly all the default(?) features, namely mouse scrolling, up and down arrow keys, home and end buttons, you would use while browsing in a window are available. In the future I would like to widen the &#8220;shortcuts&#8221; to include page down / up as well. Moreover, make it possible to configure it as you wish.</p>
<h2>Usage</h2>
<h4>HTML</h4>
<pre name = "code" class="xhtml">&lt;ul id="jreel-gallery"&gt;
	&lt;li&gt;&lt;img src="images/1.jpg" alt="1.jpg" /&gt;&lt;/li&gt;
	&lt;li&gt;&lt;img src="images/2.jpg" alt="2.jpg" /&gt;&lt;/li&gt;
	&lt;li&gt;&lt;img src="images/3.jpg" alt="3.jpg" /&gt;&lt;/li&gt;
&lt;/ul&gt;
</pre>
<h4>JavaScript</h4>
<pre name = "code"  class="javascript">jQuery(document).ready(
	function(){
		$('#images').css('height',$(window).height()); /* I set the height by javascript to fill the full screen */
		$("ul#jreel-gallery").reelGallery();
	}
);
</pre>
<h4>CSS</h4>
<pre name = "code" class="css">ul#jreel-gallery {
	width: 400px;
	height: 1px; /* In the example I set the height by javascript, see above */
	margin: 0 auto;
	padding: 0px 50px;
	overflow: hidden;
}

ul#jreel-gallery li {
	width: 400px;
	height: 300px; // Important! See below
	background: #fff;
	margin: 35px 0px;
	position: relative;
}
ul#jreel-gallery img {
		width: 400px;
		height: 300px; // Important! See below
	}
</pre>
<p>Note: I use precise dimensions for the images. It is not necessary to give the proper size of each and every image, but it comes with a price. The code itself contains an algorithm for this case that will calculate the all the heights by measuring the images. Problem is solves, or isn&#8217;t? No, because to calculate the proper size all the images, they have to be loaded before the algorithm is running. This means you need to use a preloader for your website or otherwise you are forced to give the dimensions by hand. It&#8217;s up to you. <em>I suggest using a preloader</em>.</p>
<p>In the <a title="jReelGallery Demo" href="http://www.marcelljusztin.com/stuff/reel-gallery/index" target="_blank">demo</a> I&#8217;m using a preloader, because I want to show the full potential of the plugin. I combined it the famous thickbox plugin and a PHP on-the-fly thumbnail generator.</p>
<h4>Options</h4>
<table style="border: medium none;">
<tbody>
<tr>
<td>maxAcceleration : 20</td>
<td>Actually it&#8217;s a negative acceleration. This number is used when the gallery reaches the end or top. It slows down the easing. Higher number means smaller easing (= takes more time to stop).</td>
</tr>
<tr style="background: none repeat scroll 0% 0% #cccccc;">
<td>speedFactor: 0.2</td>
<td>It&#8217;s the factor of the easing. Very sensitive. Try changing it to 0.1 for example.</td>
</tr>
<tr>
<td>framesPerSecundum: 33</td>
<td>How often should the code refresh in a second? Like speedFactor, changing it may require a fine tuning on other options (like speedFactor)</td>
</tr>
<tr style="background: none repeat scroll 0% 0% #cccccc;">
<td>eventArea: &#8216;document&#8217;</td>
<td>Where the events should be triggered?</td>
</tr>
<tr>
<td>keyEvents: true</td>
<td>Should the keyboard shortcuts (up, down, home, end) be enabled?</td>
</tr>
<tr style="background: none repeat scroll 0% 0% #cccccc;">
<td>mouseEvents: true</td>
<td>Should the mouse scrolling be enabled?</td>
</tr>
</tbody>
</table>
<h2>Sources</h2>
<ul>
<li>jQuery MouseWheel by <a href="http://brandonaaron.net">Brandon Aaron</a></li>
<li>Thickbox 3.1 &#8211; <em>One Box To Rule Them All</em> by <a href="http://www.codylindley.com">Cody Lindley</a></li>
<li>Query Loader by <a href="http://www.gayadesign.com">Gaya Kessler</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.marcelljusztin.com/blog/javascript/jreelgallery-jquery-image-gallery/feed/</wfw:commentRss>
		<slash:comments>19</slash:comments>
		</item>
		<item>
		<title>Launch of the new website</title>
		<link>http://www.marcelljusztin.com/blog/news/launch-of-the-new-website/</link>
		<comments>http://www.marcelljusztin.com/blog/news/launch-of-the-new-website/#comments</comments>
		<pubDate>Thu, 08 Jul 2010 18:07:02 +0000</pubDate>
		<dc:creator>Marcell</dc:creator>
				<category><![CDATA[News]]></category>
		<category><![CDATA[marcelljusztin.com]]></category>
		<category><![CDATA[news]]></category>

		<guid isPermaLink="false">http://www.marcelljusztin.com/blog/?p=13</guid>
		<description><![CDATA[&#160;]]></description>
			<content:encoded><![CDATA[<p>Welcome to my new portfolio and blog. In the last few months I have been constantly working to create this site for the citizens of <em>The Internet</em>. The aim of the blog is mainly to share ideas, solutions and help other web developers and designers avoiding common mistakes I am facing due to my work. I hope everyone will find this blog useful and help in reaching its goal.</p>
<p>The blog is built on the latest wordpress 3.0 release and it is using a custom theme created by me. It still has some minor issues and by time I will expand it to achieve smoother user experience.</p>
<p>If you have any questions or just would like to say hello, please feel free to leave a comment below or send me an email.</p>
<p><strong>Have a nice day!</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://www.marcelljusztin.com/blog/news/launch-of-the-new-website/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

