// FADING ROLLOVERS - props to the guys at jqueryfordesigners.com
    (function ($) {
        $.fn.cross = function (options) {
            return this.each(function (i) { 
                // cache the copy of jQuery(this) - the start image
                var $$ = $(this);
                
                // get the target from the backgroundImage + regexp
                var target = $$.css('backgroundImage').replace(/^url|[\(\)'"]/g, '');

                // nice long chain: wrap img element in span
                $$.wrap('<span style="position: relative;"></span>')
                    // change selector to parent - i.e. newly created span
                    .parent()
                    // prepend a new image inside the span
                    .prepend('<img>')
                    // change the selector to the newly created image
                    .find(':first-child')
                    // set the image to the target
                    .attr('src', target);

                if ($.browser.msie || $.browser.mozilla) {
                    $$.css({
                        'position' : 'absolute', 
                        'left' : 0,
                        'background' : '',
                        'top' : this.offsetTop
                    });
                } else if ($.browser.opera && $.browser.version < 9.5) {
                   
                    $$.css({
                        'position' : 'absolute', 
                        'left' : 0,
                        'background' : '',
                        'top' : "0"
                    });
                } else { // Safari
                    $$.css({
                        'position' : 'absolute', 
                        'left' : 0,
                        'background' : ''
                    });
                }


                $$.hover(function () {
                    $$.stop().animate({
                        opacity: .25
                    }, 550);
                }, function () {
                    $$.stop().animate({
                        opacity: 1
                    }, 550);
                });
            });
        };
        
    })(jQuery);
    $(window).bind('load', function () {
        $('img.fade').cross();
    });
    
    
    
    
    
    
    
    // PIROBOX POPUPS
    $(document).ready(function() {
	$().piroBox({
			my_speed: 600, //animation speed
			bg_alpha: 0.5, //background opacity
			radius: 5, //caption rounded corner
			scrollImage : false, // true == image follows the page, false == image remains in the same open position
			pirobox_next : 'piro_next_out', // Nav buttons -> piro_next == inside piroBox , piro_next_out == outside piroBox
			pirobox_prev : 'piro_prev_out',// Nav buttons -> piro_prev == inside piroBox , piro_prev_out == outside piroBox
			close_all : '.piro_close',// add class .piro_overlay(with comma)if you want overlay click close piroBox
			slideShow : '', // just delete slideshow between '' if you don't want it.
			slideSpeed : 4 //slideshow duration in seconds(3 to 6 Recommended)
	});
});




// About Tooltip - props to Ara Abcarians: http://www.ara-abcarians.com/jquery/atooltip/#demos
$(function(){ 
				
				$('a.clickTip').aToolTip({
		    		clickIt: true,
		    		tipContent: '<img src="i/img_seancorey.png" style="float: right;padding:5px 0 5px 0;" />Hi, my name is Sean Corey. I\'m an award-winning web designer and the CEO of 5-Squared. I\'m passionate about clean design, well written code, and usable websites. I specialize in UI design, Front-end Coding, and Custom Wordpress Solutions.<br><br>5-squared is primarily a one-man web design studio, however I work collaboratively with a handful of highly skilled designers and developers located in many different parts of the globe.<br><br>Please check out some of my recent work and <a href="&#109;&#097;&#105;&#108;&#116;&#111;:&#105;&#110;&#102;&#111;&#064;&#053;&#045;&#115;&#113;&#117;&#097;&#114;&#101;&#100;&#046;&#099;&#111;&#109;" style="color:#888;">get in touch</a> if you think I might be a good fit for your upcoming project.',
		    		xOffset: -340,							// x Position
					yOffset: -340							// y position

				});				
				
				
			});

