$(function(){
	$('#tweet').social({
		network		: 'twitter',
		user		: 'thecab',
		count		: 1,
        wrapListIn  : '<ul id="tweetSlider" />',
		twitter		: {
		  output		: '<span class="tweet"><span class="text">{text}</span> <span class="time">Posted {time}</span>/ Follow <a href="{tweet_url}">@thecab</a></span>'
    	}
		
    });

    $('#dashboard .toggle').unbind('click');

	$('#filter h2 span').append('<h5>open</h5>');
		var fh2 = $('#filter h2 span h5'),
            filterh2 = $('#filter h2 span'),
            filterDiv = $('#filter form.panel').hide();
    
        filterh2.click(function(){
            filterDiv.slideToggle("slow");
            var text = fh2.text() == 'open' ? 'close' : 'open';
            fh2.text(text)
            .toggleClass("active");
    });

    $('a[href="/player"]').click(function(e) {
		e.preventDefault();
    	window.open($(this).attr('href'), 'the cab player', "location=0,status=0,menubar=0,width=400px,height=200px,scrollbars=0");
    });

    // Render a free download link to applicable SKUs
    $('#GC.GC_order table a[href*="cab-cd-001"], #GC.GC_order table a[href*="cab-cd-002"], #GC.GC_order table a[href*="cab-cd-003s"], #GC.GC_order table a[href*="cab-cd-003m"], #GC.GC_order table a[href*="cab-cd-003l"], #GC.GC_order table a[href*="cab-cd-003xl"], #GC.GC_order table a[href*="cab-cd-003xxl"], #GC.GC_order table a[href*="cab-cd-003ws"], #GC.GC_order table a[href*="cab-cd-003wm"], #GC.GC_order table a[href*="cab-cd-003wl"], #GC.GC_order table a[href*="cab-cd-003wxl"], #GC.GC_order table a[href*="cab-cd-004s"], #GC.GC_order table a[href*="cab-cd-004m"], #GC.GC_order table a[href*="cab-cd-004l"], #GC.GC_order table a[href*="cab-cd-004xl"], #GC.GC_order table a[href*="cab-cd-004xxl"], #GC.GC_order table a[href*="cab-cd-004ws"], #GC.GC_order table a[href*="cab-cd-004wm"], #GC.GC_order table a[href*="cab-cd-004wl"], #GC.GC_order table a[href*="cab-cd-004wxl"], #GC.GC_order table a[href*="cab-cd-005"], #GC.GC_order table a[href*="cab-cd-006s"], #GC.GC_order table a[href*="cab-cd-006m"], #GC.GC_order table a[href*="cab-cd-006l"], #GC.GC_order table a[href*="cab-cd-006xl"], #GC.GC_order table a[href*="cab-cd-006xxl"], #GC.GC_order table a[href*="cab-cd-006ws"], #GC.GC_order table a[href*="cab-cd-006wm"], #GC.GC_order table a[href*="cab-cd-006wl"], #GC.GC_order table a[href*="cab-cd-006wxl"], #GC.GC_order table a[href*="cab-cd-007"], #GC.GC_order table a[href*="cab-cd-008"], #GC.GC_order table a[href*="cab-cd-009"], #GC.GC_order table a[href*="cab-cd-010"], #GC.GC_order table a[href*="cab-cd-011"]').after('<br />Download your purchase: <span class="note"><a href="http://bit.ly/qW5ySu">Symphony Soldier</a></span>');

});



