﻿
/// <reference path="jquery-1.4.1-vsdoc.js" />
/// <reference path="jquery.colorbox-min.js" />

var $jq = jQuery.noConflict();

$jq(function() {
    if($jq('.edit-btn') != null){
        $jq('.edit-btn').colorbox({ width: "100%", height: "100%", iframe: true, overlayClose: false, onClosed: function() { location.reload(true); } });
    }
    if($jq('.overlay') != null){
        $jq('.overlay').hide();
    }
    if($jq('.module-title') != null){
        $jq('.module-title').css("cursor", "move");
    }
    /*if($jq('.column') != null){
        $jq('.column').sortable({
            placeholder: 'placeholder',
            forcePlaceholderSize: true,
            cursor: 'move',
            handle: '.module-title',
            opacity: 0.4,
            revert: 300,
            containment: 'document',
            tolerance: 'pointer',
            update: function(event, ui) {
                var Order = $jq(this).sortable('serialize', { key: 'ID' }).toString();
                $jq("#drag").load("/UpdateOrder.aspx?" + Order);
            }

        });
    }*/
    if($jq('.colorbox') != null){
        $jq('.colorbox').colorbox();
    }
	
    if($jq('#slider') != null){
        $jq('#slider').easySlider({continuous: true, nextText:'', prevText:''});
    }

    var galleries = $jq('.ad-gallery').adGallery();
    if (galleries[0] != null)
    {
	galleries[0].slideshow.start();
    }
});

$jq(function openColorbox() {
    $jq('.edit-content').colorbox({ width: "950px", height: "100%", iframe: true, overlayClose: false });

});


$jq(function slideDown(overlay) {
    $jq('#' + overlay).slideDown(300);

});

$jq(function slideUp(overlay) {
    $jq('#' + overlay).slideUp(300);

});

