$(document).ready(function(){
	/* IE6 PNG SUPPORT
	---------------------------------------------------------- */
    // Fix background image caching problem
	
	if ($.browser.msie && $.browser.version.substr(0,1) < 7 ) 
	{
        try { 
            document.execCommand("BackgroundImageCache", false, true); 
        } catch(err) 
		{
			console.log(err.toString());
		}
		
		// DD_belatedPNG.fix('#logo');
		
			DD_belatedPNG.fix('.info-box');
			DD_belatedPNG.fix('.scroll-action.prev');
			DD_belatedPNG.fix('.scroll-action.next');

		if ( $("#sidebar").length > 0 ) {
			DD_belatedPNG.fix('#sidebar .sidebar-box ul li a:hover');
		}
  }
	
	/* Fancybox  ---------------------------------------------------- */
	$("a#fancybox").fancybox({ 
		'titleShow'		: false,
		'padding': 20,
		'overlayColor': '#000',
		'overlayOpacity': 0.6,
		'hideOnContentClick': true,
		'showNavArrows': true,
		'frameWidth': 800,
        'frameHeight': 600,
		'width': 940,
		'height': 429
	});
	
	$("a#bunnyAnimation").fancybox({ 
		'titleShow'		: false,
		'padding': 20,
		'overlayColor': '#000',
		'overlayOpacity': 0.6,
		'hideOnContentClick': true,
		'showNavArrows': true,
		'frameWidth': 800,
        'frameHeight': 600,
		'width': 700,
		'height': 273
	});
	
	$("#rockingHorse").click(function() {
		$.fancybox([
			{
				'href'	: 'http://andrei-art.com/wordpress/wp-content/uploads/2010/07/toyHorse_large.jpg',
				'title' : 'AT THE RACETRACK - ',
			},
			{
				'href'	: 'http://andrei-art.com/wordpress/wp-content/uploads/2010/07/toyHorseSide_large.jpg',
				'title' : 'AT THE RACETRACK - ',
			},
			{
				'href'	: 'http://andrei-art.com/wordpress/wp-content/uploads/2010/07/toyHorseFront_large.jpg',
				'title' : 'AT THE RACETRACK - ',
			},
			{
				'href'	: 'http://andrei-art.com/wordpress/wp-content/uploads/2010/07/toyHorseBack_large.jpg',
				'title' : 'AT THE RACETRACK - ',
			}
		], {
		'titleFormat':function(itemTitle, itemArray, itemIndex, itemOpts) {
                  return '<strong>' + itemTitle + '<span> Image ' + (itemIndex + 1) + ' of ' + itemArray.length + '</span></strong>';
				},
		'titleShow'		: true,
		'titlePosition'  : 'inside',
		'padding': 20,
		'overlayColor': '#000',
		'overlayOpacity': 0.6,
		'hideOnContentClick': true,
		'showNavArrows': true,
		'frameWidth': 800,
        'frameHeight': 600,
		'width': 940,
		'height': 429
		});
	});
	
	$("#golfGrass").click(function() {
		$.fancybox([
			{
				'href'	: 'http://andrei-art.com/wordpress/wp-content/uploads/2010/07/golfTurf_large.jpg',
				'title' : 'OUT GOLFING - ',
			},
			{
				'href'	: 'http://andrei-art.com/wordpress/wp-content/uploads/2010/07/golfTurf1_large.jpg',
				'title' : 'OUT GOLFING - ',
			}
		], {
		'titleFormat':function(itemTitle, itemArray, itemIndex, itemOpts) {
                  return '<strong>' + itemTitle + '<span> Image ' + (itemIndex + 1) + ' of ' + itemArray.length + '</span></strong>';
				},
		'titleShow'		: true,
		'titlePosition'  : 'inside',
		'padding': 20,
		'overlayColor': '#000',
		'overlayOpacity': 0.6,
		'hideOnContentClick': true,
		'showNavArrows': true,
		'frameWidth': 800,
        'frameHeight': 600,
		'width': 940,
		'height': 429
		});
	});
	
	$("#audrey").click(function() {
		$.fancybox([
			{
				'href'	: 'http://andrei-art.com/wordpress/wp-content/uploads/2010/11/Audrey1_large.jpg',
				'title' : 'Funny Face - ',
			},
			{
				'href'	: 'http://andrei-art.com/wordpress/wp-content/uploads/2010/11/Audrey1_1_large.jpg',
				'title' : 'Funny Face - ',
			},
			{
				'href'	: 'http://andrei-art.com/wordpress/wp-content/uploads/2010/11/Audrey1_2_large.jpg',
				'title' : 'Funny Face - ',
			},
			{
				'href'	: 'http://andrei-art.com/wordpress/wp-content/uploads/2010/11/Audrey1_3_large.jpg',
				'title' : 'Funny Face - ',
			},
			{
				'href'	: 'http://andrei-art.com/wordpress/wp-content/uploads/2010/11/Audrey1_4_large.jpg',
				'title' : 'Funny Face - ',
			}
		], {
		'titleFormat':function(itemTitle, itemArray, itemIndex, itemOpts) {
                  return '<strong>' + itemTitle + '<span> Image ' + (itemIndex + 1) + ' of ' + itemArray.length + '</span></strong>';
				},
		'titleShow'		: true,
		'titlePosition'  : 'inside',
		'padding': 20,
		'overlayColor': '#000',
		'overlayOpacity': 0.6,
		'hideOnContentClick': true,
		'showNavArrows': true,
		'frameWidth': 800,
        'frameHeight': 600,
		'width': 940,
		'height': 429
		});
	});
	
	$("#bakeshop").click(function() {
		$.fancybox([
			{
				'href'	: 'http://andrei-art.com/wordpress/wp-content/uploads/2011/02/bakeshop_large.jpg',
				'title' : 'GayLea BakeShop - ',
			},
			{
				'href'	: 'http://andrei-art.com/wordpress/wp-content/uploads/2011/02/bakeshopExterior_large.jpg',
				'title' : 'GayLea BakeShop - ',
			},
			{
				'href'	: 'http://andrei-art.com/wordpress/wp-content/uploads/2011/02/bakeshopCanClosed_large.jpg',
				'title' : 'GayLea BakeShop - ',
			},
			{
				'href'	: 'http://andrei-art.com/wordpress/wp-content/uploads/2011/02/bakeshopCanOpen_large.jpg',
				'title' : 'GayLea BakeShop - ',
			}
		], {
		'titleFormat':function(itemTitle, itemArray, itemIndex, itemOpts) {
                  return '<strong>' + itemTitle + '<span> Image ' + (itemIndex + 1) + ' of ' + itemArray.length + '</span></strong>';
				},
		'titleShow'		: true,
		'titlePosition'  : 'inside',
		'padding': 20,
		'overlayColor': '#000',
		'overlayOpacity': 0.6,
		'hideOnContentClick': true,
		'showNavArrows': true,
		'frameWidth': 800,
        'frameHeight': 600,
		'width': 940,
		'height': 429
		});
	});
	
	$("#cesar").click(function() {
		$.fancybox([
			{
				'href'	: 'http://andrei-art.com/wordpress/wp-content/uploads/2011/02/Cesar_large.jpg',
				'title' : 'Cesar Dinner - ',
			},
			{
				'href'	: 'http://andrei-art.com/wordpress/wp-content/uploads/2011/02/CesarHandkerchief_large.jpg',
				'title' : 'Cesar Dinner - ',
			},
			{
				'href'	: 'http://andrei-art.com/wordpress/wp-content/uploads/2011/02/CesarSet_large.jpg',
				'title' : 'Cesar Dinner - ',
			}
		], {
		'titleFormat':function(itemTitle, itemArray, itemIndex, itemOpts) {
                  return '<strong>' + itemTitle + '<span> Image ' + (itemIndex + 1) + ' of ' + itemArray.length + '</span></strong>';
				},
		'titleShow'		: true,
		'titlePosition'  : 'inside',
		'padding': 20,
		'overlayColor': '#000',
		'overlayOpacity': 0.6,
		'hideOnContentClick': true,
		'showNavArrows': true,
		'frameWidth': 800,
        'frameHeight': 600,
		'width': 940,
		'height': 429
		});
	});
	
	$(".smartManMov").fancybox({
		'width': 818, //or whatever
		'height': 628,
		'scrolling':'no',
		'padding': 0, //optional
		'type': 'iframe'
	});
	
	$("#chrissi").click(function() {
		$.fancybox([
			{
				'href'	: 'http://andrei-art.com/wordpress/wp-content/uploads/2011/03/Chrissi3_large.jpg',
				'title' : 'Glamorous - ',
			},
			{
				'href'	: 'http://andrei-art.com/wordpress/wp-content/uploads/2011/03/Chrissi3_large1.jpg',
				'title' : 'Glamorous - ',
			},
			{
				'href'	: 'http://andrei-art.com/wordpress/wp-content/uploads/2011/03/Chrissi3_large2.jpg',
				'title' : 'Glamorous - ',
			}
		], {
		'titleFormat':function(itemTitle, itemArray, itemIndex, itemOpts) {
                  return '<strong>' + itemTitle + '<span> Image ' + (itemIndex + 1) + ' of ' + itemArray.length + '</span></strong>';
				},
		'titleShow'		: true,
		'titlePosition'  : 'inside',
		'padding': 20,
		'overlayColor': '#000',
		'overlayOpacity': 0.6,
		'hideOnContentClick': true,
		'showNavArrows': true,
		'frameWidth': 800,
        'frameHeight': 600,
		'width': 940,
		'height': 429
		});
	});
	
	/* Scrolling Section -------------------------------------------- */
	
	    // select #flowplanes and make it scrollable. use circular and navigator plugins 
    $("#scrollDisplay").scrollable({size: 1}).circular().navigator({ 
 
        // select A tags inside the navigator to work as items (not direct children) 
        naviItem: 'a', 
 
        // assign "current" class name for the active A tag inside navigator 
        activeClass: 'current' 
 
    }); 
});
