jQuery(document).ready(function() {


            
    /*
    *   Tips & Tricks
    */
    
    $("#tip3").fancybox({
        'transitionIn'  : 'none',
        'transitionOut' : 'none',
        'titlePosition' : 'over',
        'onComplete'    : function() {
            $("#fancybox-wrap").hover(function() {
                $("#fancybox-title").show();
            }, function() {
                $("#fancybox-title").hide();
            });
        }
    });

    $(".tip4").click(function() {
        $.fancybox({
            'padding'       : 0,
            'autoScale'     : false,
            'transitionIn'  : 'none',
            'transitionOut' : 'none',
            'title'         : this.title,
            'width'         : 680,
            'height'        : 495,
            'href'          : this.href.replace(new RegExp("watch\\?v=", "i"), 'v/'),
            'type'          : 'swf',
            'swf'           : {
                'wmode'             : 'transparent',
                'allowfullscreen'   : 'true'
            }
        });

        return false;
    });


    
    $(".tip6").fancybox({
        'transitionIn'      : 'none',
        'transitionOut'     : 'none',
        'autoScale'         : false,
        'type'              : 'iframe',
        'width'             : 500,
        'height'            : 500,
        'scrolling'         : 'no'
    });
    
    function formatTitle(title, currentArray, currentIndex, currentOpts) {
        return '<div id="tip7-title"><span><a href="javascript:;" onclick="$.fancybox.close();"><img src="http://www.illustratorsireland.com/js/fancybox/fancy_close_igi.png" /></a></span>' + (title && title.length ? '<b>' + title + '</b>' : '' ) + 'Image ' + (currentIndex + 1) + ' of ' + currentArray.length + '</div>';
    }

    $(".tip7").fancybox({
     'transitionIn'  : 'fade',
        'transitionOut' : 'fade',
        'showCloseButton'   : false,
        'titlePosition'     : 'inside',
        'titleFormat'       : formatTitle
    });
    
  
});
