/**
 * @author Dave Mascia <dmascia@masciasystems.com>
 */
$(document).ready(function(){

    $("#demo").fancybox({
        'width'				: '95%',
        'height'		        : '95%',
        'autoScale'			: true,
        'transitionIn'		        : 'elastic',
        'transitionOut'		        : 'elastic',
        'type'				: 'iframe'
    });

     $("#demo2").fancybox({
        'width'				: '95%',
        'height'		        : '95%',
        'autoScale'			: true,
        'transitionIn'		        : 'elastic',
        'transitionOut'		        : 'elastic',
        'type'				: 'iframe'
    });


 /**
 * Artist pay out boxes
 */
    $("#pay").fancybox({
        'width'				: '35%',
        'height'			: '25%',
        'autoScale'			: true,
        'transitionIn'		        : 'elastic',
        'transitionOut'		        : 'elastic',
        'type'				: 'iframe'
    });

    $("#pay2").fancybox({
        'width'				: '35%',
        'height'			: '25%',
        'autoScale'			: true,
        'transitionIn'		        : 'elastic',
        'transitionOut'		        : 'elastic',
        'type'				: 'iframe'
    });

    $("#pay3").fancybox({
        'width'				: '35%',
        'height'			: '25%',
        'autoScale'			: true,
        'transitionIn'		        : 'elastic',
        'transitionOut'		        : 'elastic',
        'type'				: 'iframe'
    });
    $("#pay4").fancybox({
        'width'				: '35%',
        'height'			: '25%',
        'autoScale'			: true,
        'transitionIn'		        : 'elastic',
        'transitionOut'		        : 'elastic',
        'type'				: 'iframe'
    });
    $("#pay5").fancybox({
        'width'				: '35%',
        'height'			: '25%',
        'autoScale'			: true,
        'transitionIn'		        : 'elastic',
        'transitionOut'		        : 'elastic',
        'type'				: 'iframe'
    });


 /**
 * menu box
 */

    $.get('includes/splash/sellers5.php', function(data){
            $('div#menu1div').html(data);
            return false;
    });

    $('a#menu1link').click(function(event){

        event.stopPropagation();

        var href = $(this).attr('href');

        $.get(href, function(data){
            $('div#menu1div').html(data);
            return false;
        });

        return false;

    });

    $.get('includes/splash/sellers2.php', function(data){
            $('div#menu2div').html(data);
            return false;
    });


    $('a#menu2link').click(function(event){

        event.stopPropagation();

        var href = $(this).attr('href');

        $.get(href, function(data){
            $('div#menu2div').html(data);
            return false;
        });

        return false;

    });

    $.get('includes/splash/sellers3.php', function(data){
            $('div#menu3div').html(data);
            return false;
    });


    $('a#menu3link').click(function(event){

        event.stopPropagation();

        var href = $(this).attr('href');

        $.get(href, function(data){
            $('div#menu3div').html(data);
            return false;
        });

        return false;

    });

    $.get('includes/splash/sellers4.php', function(data){
            $('div#menu4div').html(data);
            return false;
    });


    $('a#menu4link').click(function(event){

        event.stopPropagation();

        var href = $(this).attr('href');

        $.get(href, function(data){
            $('div#menu4div').html(data);
            return false;
        });

        return false;

    });

    $.get('includes/splash/sellers1.php', function(data){
            $('div#menu5div').html(data);
            return false;
    });

    $('a#menu5link').click(function(event){

        event.stopPropagation();

        var href = $(this).attr('href');

        $.get(href, function(data){
            $('div#menu5div').html(data);
            return false;
        });

        return false;

    });

    /**
 * play feature
 */
    $('.middleplaybutton').live('click', function(event){
        event.stopPropagation();

        var href = $(this).attr('href');
        var player_id = $(this).attr('id');
        var users_id = "";

        $.get(href,function(data){


            $('.player').html(data);

            return false;

        });
        $.ajax({
            url:"plays.php",
            type: "POST",
            data: {
                player: player_id,
                users_id: users_id
            },
            dataType: "json"
        });

        return false;
    });

});


