ihatestickers.com just added a bunch of great new products. You should all check it out!
I have been working on the new True Negative website pretty much non-stop lately and I’m using several differernt things from the jQuery JavaScript library. One of these is the jQuery Accordion Menu, from their User Interface library. It’s a great simple menu that can be implemented with very little javascript code.
One thing that it doesn’t inherently support is saving the state between webpages, which is something I had wanted since I’m using it as a menu, not just for content display. Functionally, I knew what had to be done in order to get it to save state. It was obvious that I needed to use cookies and some quick javascript to save what menu was open. I then came across the jQuery Cookie plugin, which really simplifies working with cookies in jQuery.
Setting a cookie with the plugin is as simple as follows:
$.cookie('cookiename', 'cookiecontents');
The accordion menu has an event change attribute, which can be set to a function or just inline code. Using both this feature and the cookie plugin, it was very simple to write the code that I needed in order to get the result I wanted. Here is the code and I will explain it below:
// accordion menu
$('#menu').accordion({
header: 'h3',
navigation: true,
active: '.selected',
autoHeight: false,
clearStyle: true,
collapsibe: true,
alwaysOpen: false,
animated: 'slide',
change: function(event,ui) {
var hid = ui.newHeader.children('a').attr('id');
if (hid === undefined) {
$.cookie('menustate', null);
} else {
$.cookie('menustate', hid, { expires: 2 });
}
}
});
// check cookie for accordion state
if($.cookie('menustate')) {
$('#menu').accordion('option', 'animated', false);
$('#menu').accordion('activate', $('#' + $.cookie('menustate')).parent('h3'));
$('#menu').accordion('option', 'animated', 'slide');
}
The first section is pretty straightforward. It defines and applies the accordion menu to a div tag with an id of menu. All of the various options are laid out in the Accordion docs and I just set some of the standard ones in order to get the look and feel that I wanted. The important part is the change option:
change: function(event,ui) {
var hid = ui.newHeader.children('a').attr('id');
if (hid === undefined) {
$.cookie('menustate', null);
} else {
$.cookie('menustate', hid, { expires: 2 });
}
Here you can see that I check the value of the menu that is open to see if it is undefined, which would mean the menu is closed. If it is open, it will have a value in there, so I store that in a cookie called “menustate” for use when the page is reloaded.
// check cookie for accordion state
if($.cookie('menustate')) {
$('#menu').accordion('option', 'animated', false);
$('#menu').accordion('activate', $('#' + $.cookie('menustate')).parent('h3'));
$('#menu').accordion('option', 'animated', 'slide');
Upon page reload I have it check the “menustate” cookie to see if it has been set or not. If it is, I first turn off the animation so the visitor does not see it open again, then I call the activate method to open the one with the id that is stored in the cookie. Lastly, I reenable the animation. It works great!
Unfortunately, I have no completed the True Negative site yet, so I do not have an example of this working. As soon as I finish the site, I’ll update this blog post with a link to it. Hope this helps anyone trying to do this in a simple way. Thanks for reading!
Track Day with the Mini!
This past saturday we were out at Dunnville Autodrome for a track day with Onyx Syndicate and NYSpeed.com. We brought my wife’s Mini Cooper S and we filmed for rspeedTV, part of rspeed.org. It was a great time and we got to meet of a lot of good people. It definitely was interesting to get the Mini out there for some lapping and to see what we could do with the car. We’ll definitely be going back for sure!


The sr20 is out!
Yesterday, myself, CaviMike and Rick from BTF Racing, Inc. pulled the sr20 from our project twoforty. It took several hours with a couple of breaks in between, but it came out with pretty much no problems. This was the first motor I have ever pulled and with the right tools, it doesn’t seem too difficult at all.
Rick is going to start working on tearing the motor down, and I’m going to send some of the engine oil to Blackstone Labs for analysis. I’ve trailered the car back with me so I can continue to strip the interior and sound deadening. It goes to Reactive Chassis soon for cage work.



Project 240sx begins!
This past saturday, my friend Kevin and I deciding to start project twoforty and strip the interior of the 240sx that I bought from Ricky Chu. The strip went very easily and we had the interior out in just over an hour. We still need to scrape the sound deadening from the interior and pull out the dash. In just over a week it will be going to Reactive Chassis Co for the roll cage, so it needs to be ready for him.
Check out the pics:

So long s2000
Well it is time to say goodbye to my Honda s2000. It was probably the shortest time I have ever owned a car, being only 6 months, most of them with it stored for winter. Not a huge loss though, as even though I really enjoyed the look and entertainment of the car, it just wasn’t exactly what I wanted. Also considering, we have another little one on the way, it was time to get something else.
I definitely had some good times with the car and I happy with the next owner’s attitude with the vehicle. I’m sure he will enjoy it very much!
Photoshop World 2009
Last week, my intern, Jordan, and I went to Boston for Photoshop World 2009. Having never been to one of these conventions I was a little uncertain about what to expect. With that said, I had a great time at the show! I learned a great deal and was able to polish up some of my skills.
On the first day we took a class on wedding photography with David Ziser, which turned out to be more of a class on lighting. Since we are looking to do some of our own wedding photography, we enjoyed the class very much and learned some good things on lighting in churches, etc.
The following days we took various classes on design, motion graphics, and photography. I really enjoyed the classes on motion graphics with Richard Harrington. I haven’t used the puppet tool before, and now I want to play with it haha!
For what it’s worth, it was a pretty expensive trip to Boston, but hopefully we can get some good use out of the knowledge gained.
ihatestickers.com
I have been working with my team to get ihatestickers.com ready for launch on March 14th. So far, we have been doing a great job at making progress and we are 95% complete, but we keep adding more stickers to the product catalog. I’m pretty excited for the launch and I think our site will be a great source of funny stickers and logos for everyone.
Here is the party flyer:

I was on the news!
Last night, I was on the 6pm news (No, I didn’t break any laws) talking about Kirsten Gillabrand and her flip-flop attitude with gun rights.
Well this is quite odd… after overclocking, the windows experience rating actually went DOWN. Another weird thing was that cinebench stopped being able to work…
I removed all of the partitions, and I’m doing a clean install of Windows 7 to see if that fixes the issue. There is no reason why I should be losing points from overclocking. We’ll see how it goes… Updates to follow.
Well I’ve been working on my article for Windows 7 x64 vs Vista x64 on my new Quad-Core budget PC that I built for some home gaming, and I just started doing the benchmarks for Windows 7 in overclocked form. I must say… I’m extremely surprised that I’m not seeing the same results that everyone else is seeing.
I thought that when I was doing the comparison at stock speeds, I would see a bigger difference once I overclocked, but even now, it is pretty much the same and even slower in some cases.
If I had to take a guess as to what is going on, I’d say that there are still some driver issues to be worked out. The parts are all pretty new parts, but I was able to install all of the drivers in Windows 7 without a problem.
Anyways, it looks like I might end up choosing Vista to run on my home PC. I’m itchin to start playing some CS:S, Crysis and World in Conflict.
Check out the article I just finished… It’s a HOWTO on installing and configuring Windows 7 x64 in VMWare Fusion, which is VMWare’s workstation product for Mac OS X.
http://www.mikecentola.com/blog/articles/howto-install-windows-7-x64-beta-in-vmware-fusion/
I’ve had it running on my 8-Core Mac Pro for a little while now
GSG-5
I recently picked up a GSG-5, which is a semi-automatic .22LR rifle, styled like a MP5. I wrote a small article on it over on nyfirearms.com

Check it out:GSG-5 on NY Firearms
Finally joined FaceBook!
Well I finally bit the bullet and signed up for FaceBook. It’s quote confusing, but I think I’m getting it.
I also created a page for Technotic Media. Check it out here: Technotic Media’s FaceBook.
Enjoy!

Recent Comments